Autocomplete: moved autoFocus implementation to after menu visible for a11y

(cherry picked from commit 4026d3acd7)
This commit is contained in:
Richard Worth 2011-03-15 12:26:47 -04:00
parent 1fe58dbf52
commit 3cfba5d9a8

View File

@ -360,16 +360,16 @@ $.widget( "ui.autocomplete", {
this.menu.deactivate();
this.menu.refresh();
if ( this.options.autoFocus ) {
this.menu.next( new $.Event("mouseover") );
}
// size and position menu
ul.show();
this._resizeMenu();
ul.position( $.extend({
of: this.element
}, this.options.position ));
if ( this.options.autoFocus ) {
this.menu.next( new $.Event("mouseover") );
}
},
_resizeMenu: function() {