Вызов фокуса после окончания анимации

This commit is contained in:
SleepWalker
2016-03-28 08:05:18 +03:00
parent 64d8388a73
commit 3d0f8aa9c0
9 changed files with 47 additions and 39 deletions

View File

@@ -56,6 +56,11 @@ export class Input extends Component {
getValue() {
return this.el.value;
}
focus() {
this.el.focus();
setTimeout(this.el.focus.bind(this.el), 10);
}
}
export class Checkbox extends Component {
@@ -86,6 +91,10 @@ export class Checkbox extends Component {
getValue() {
return this.el.checked ? 1 : 0;
}
focus() {
this.el.focus();
}
}
export class Form extends Component {