10000 Autocomplete: moved autoFocus implementation to after menu visible fo… · ProgramComputer/jquery-ui@4026d3a · GitHub
Skip to content

Commit 4026d3a

Browse files
committed
Autocomplete: moved autoFocus implementation to after menu visible for a11y
1 parent c1a0f2b commit 4026d3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,16 @@ $.widget( "ui.autocomplete", {
363363
this.menu.blur();
364364
this.menu.refresh();
365365

366-
if ( this.options.autoFocus ) {
367-
this.menu.next( new $.Event("mouseover") );
368-
}
369-
370366
// size and position menu
371367
ul.show();
372368
this._resizeMenu();
373369
ul.position( $.extend({
374370
of: this.element
375371
}, this.options.position ));
372+
373+
if ( this.options.autoFocus ) {
374+
this.menu.next( new $.Event("mouseover") );
375+
}
376376
},
377377

378378
_resizeMenu: function() {

0 commit comments

Comments
 (0)