focus immediately and in a timeout

This commit is contained in:
Fabian Jakobs 2011-01-26 17:15:53 +01:00
commit 86ec6c379c

View file

@ -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();
};