Skip to content

Commit

Permalink
Autocomplete: Revert fix for #7024, broke regular menu selection.
Browse files Browse the repository at this point in the history
Disabled test for now (need to reopen ticket).
  • Loading branch information
jzaefferer committed May 11, 2011
1 parent 85ac420 commit c17f245
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tests/unit/autocomplete/autocomplete_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -218,5 +219,6 @@ test("blur without selection", function() {
start();
}, 50);
});
*/

})(jQuery);
1 change: 0 additions & 1 deletion ui/jquery.ui.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ $.widget( "ui.autocomplete", {
this.menu.element.hide();
this.menu.blur();
this._trigger( "close", event );
this.menu.isNewMenu = true;
}
},

Expand Down
4 changes: 1 addition & 3 deletions ui/jquery.ui.menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var idIncrement = 0;
$.widget("ui.menu", {
defaultElement: "<ul>",
delay: 150,
isNewMenu: true,
options: {
position: {
my: "left top",
Expand Down Expand Up @@ -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" );
Expand Down

0 comments on commit c17f245

Please sign in to comment.