don't timeout focus in IE
This commit is contained in:
parent
3b3ac82634
commit
8f2949ffb6
1 changed files with 7 additions and 4 deletions
|
|
@ -245,13 +245,16 @@ var Editor =function(renderer, session) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.focus = function() {
|
this.focus = function() {
|
||||||
// Safari need the timeout
|
// Safari needs the timeout
|
||||||
// iOS and Firefox need it called immediately
|
// iOS and Firefox need it called immediately
|
||||||
// to be on the save side we do both
|
// to be on the save side we do both
|
||||||
|
// except for IE
|
||||||
var _self = this;
|
var _self = this;
|
||||||
setTimeout(function() {
|
if (!useragent.isIE) {
|
||||||
_self.textInput.focus();
|
setTimeout(function() {
|
||||||
});
|
_self.textInput.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
this.textInput.focus();
|
this.textInput.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue