Navigation Menu

Skip to content

Commit

Permalink
Autocomplete: Trigger close after hiding the menu. Fixes #6227 - Auto…
Browse files Browse the repository at this point in the history
…complete: Don't trigger close event until after the menu is hidden.
  • Loading branch information
scottgonzalez committed Oct 26, 2010
1 parent 9ead629 commit f4d8ec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/unit/autocomplete/autocomplete_events.js
Expand Up @@ -28,7 +28,7 @@ test("all events", function() {
},
close: function(event) {
same(event.type, "autocompleteclose");
same( $(".ui-menu:visible").length, 1 );
same( $(".ui-menu:visible").length, 0 );
},
select: function(event, ui) {
same(event.type, "autocompleteselect");
Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.autocomplete.js
Expand Up @@ -295,9 +295,9 @@ $.widget( "ui.autocomplete", {
close: function( event ) {
clearTimeout( this.closing );
if ( this.menu.element.is(":visible") ) {
this._trigger( "close", event );
this.menu.element.hide();
this.menu.deactivate();
this._trigger( "close", event );
}
},

Expand Down

0 comments on commit f4d8ec9

Please sign in to comment.