mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Autocomplete: Trigger close after hiding the menu. Fixes #6227 - Autocomplete: Don't trigger close event until after the menu is hidden.
This commit is contained in:
parent
9ead629c2c
commit
f4d8ec9159
@ -28,7 +28,7 @@ test("all events", function() {
|
|||||||
},
|
},
|
||||||
close: function(event) {
|
close: function(event) {
|
||||||
same(event.type, "autocompleteclose");
|
same(event.type, "autocompleteclose");
|
||||||
same( $(".ui-menu:visible").length, 1 );
|
same( $(".ui-menu:visible").length, 0 );
|
||||||
},
|
},
|
||||||
select: function(event, ui) {
|
select: function(event, ui) {
|
||||||
same(event.type, "autocompleteselect");
|
same(event.type, "autocompleteselect");
|
||||||
|
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@ -295,9 +295,9 @@ $.widget( "ui.autocomplete", {
|
|||||||
close: function( event ) {
|
close: function( event ) {
|
||||||
clearTimeout( this.closing );
|
clearTimeout( this.closing );
|
||||||
if ( this.menu.element.is(":visible") ) {
|
if ( this.menu.element.is(":visible") ) {
|
||||||
this._trigger( "close", event );
|
|
||||||
this.menu.element.hide();
|
this.menu.element.hide();
|
||||||
this.menu.deactivate();
|
this.menu.deactivate();
|
||||||
|
this._trigger( "close", event );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user