]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: moved autoFocus implementation to after menu visible for a11y
authorRichard Worth <rdworth@gmail.com>
Tue, 15 Mar 2011 16:26:47 +0000 (12:26 -0400)
committerRichard Worth <rdworth@gmail.com>
Tue, 15 Mar 2011 16:27:40 +0000 (12:27 -0400)
(cherry picked from commit 4026d3acd70508ca285bd4eb182b8f0b43eae5c8)

ui/jquery.ui.autocomplete.js

index 2043223202176f8d8255f6a0312222c631273e67..dfe3fa3f37449f0a4c9bff124c746353eaa545bd 100644 (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() {