Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix #962 autoselect is called asynchronously after focus()

Fix required as test.aria.widgets.autoselect.programmatic.AutoSelect failed on IE 11,
as .focus() is asynchronous on this browser.

Close #950
  • Loading branch information...
commit d775a3b6bfc0a4262aa2aac13b3501176dc66145 1 parent 0d033f4
@fbasso fbasso authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/aria/widgets/form/TextInput.js
View
9 src/aria/widgets/form/TextInput.js
@@ -1184,7 +1184,14 @@ Aria.classDefinition({
textInputField.value = textInputField.value;
if (!fromSelf) {
- this._autoselect();
+ // IE FIX: the focus() can be asynchronous, so let's add a timeout to manage the autoselect
+ aria.core.Timer.addCallback({
+ fn : function() {
+ this._autoselect();
+ },
+ scope : this,
+ delay : 25
+ });
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.