focus immediately and in a timeout
This commit is contained in:
parent
23a2e368fc
commit
86ec6c379c
1 changed files with 7 additions and 0 deletions
|
|
@ -221,6 +221,13 @@ var Editor =function(renderer, session) {
|
|||
};
|
||||
|
||||
this.focus = function() {
|
||||
// Safari need the timeout
|
||||
// iOS and Firefox need it called immediately
|
||||
// to be on the save side we do both
|
||||
var _self = this;
|
||||
setTimeout(function() {
|
||||
_self.textInput.focus();
|
||||
});
|
||||
this.textInput.focus();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue