Autocomplete: moved autoFocus implementation to after menu visible for a11y

This commit is contained in:
Richard Worth
2011-03-15 12:26:47 -04:00
parent c1a0f2bf6c
commit 4026d3acd7

View File

@@ -363,16 +363,16 @@ $.widget( "ui.autocomplete", {
this.menu.blur();
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() {