]> 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:26:47 +0000 (12:26 -0400)
ui/jquery.ui.autocomplete.js

index a9e4b411929a4a2c16dc0013cab6908804489361..ee6eb659f4b709c0bd60f8d54f98f4dbf3de02c9 100644 (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() {