]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Revert fix for #7024, broke regular menu selection.
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 11 May 2011 11:19:46 +0000 (13:19 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 11 May 2011 11:19:46 +0000 (13:19 +0200)
Disabled test for now (need to reopen ticket).

tests/unit/autocomplete/autocomplete_events.js
ui/jquery.ui.autocomplete.js
ui/jquery.ui.menu.js

index eb009064cbec27c66049d9bb71117f93f2be0647..c884733d669c776b09c5a939136b38bbd22b38ec 100644 (file)
@@ -203,6 +203,7 @@ test("cancel select", function() {
        }, 50);
 });
 
+/* TODO previous fix broke more than it fixed, disabling this for now - messed up regular menu select event
 test("blur without selection", function() {
        expect(1);
        var ac = $("#autocomplete").autocomplete({
@@ -218,5 +219,6 @@ test("blur without selection", function() {
                start();
        }, 50);
 });
+*/
 
 })(jQuery);
index b3d7598c1fdfd4f7c2193f2947ef9ab7d5f36d7e..0e62ccfdb62a5c4e6ad1e39d3b57857178c1a03e 100644 (file)
@@ -365,7 +365,6 @@ $.widget( "ui.autocomplete", {
                        this.menu.element.hide();
                        this.menu.blur();
                        this._trigger( "close", event );
-                       this.menu.isNewMenu = true;
                }
        },
        
index 3cc25062c25db84b262dac5a5f0b6b302053a553..0841018af1534b1d0183a70009f4c6fc46f7fcf5 100644 (file)
@@ -18,7 +18,6 @@ var idIncrement = 0;
 $.widget("ui.menu", {
        defaultElement: "<ul>",
        delay: 150,
-       isNewMenu: true,
        options: {
                position: {
                        my: "left top",
@@ -55,8 +54,7 @@ $.widget("ui.menu", {
                                self.select( event );
                        })
                        .bind( "mouseover.menu", function( event ) {
-                               if ( self.options.disabled || self.isNewMenu ) {
-                                       self.isNewMenu = false;
+                               if ( self.options.disabled ) {
                                        return;
                                }
                                var target = $( event.target ).closest( ".ui-menu-item" );