mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: close menu on other element mousedown not on click
This commit is contained in:
parent
f3e4b24485
commit
027d8d4cab
@ -49,7 +49,7 @@ test( "close", function () {
|
|||||||
this.element.selectmenu( "open" ).selectmenu( "close" );
|
this.element.selectmenu( "open" ).selectmenu( "close" );
|
||||||
|
|
||||||
this.element.selectmenu( "open" );
|
this.element.selectmenu( "open" );
|
||||||
$( "body" ).trigger( "click" );
|
$( "body" ).trigger( "mousedown" );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
2
ui/jquery.ui.selectmenu.js
vendored
2
ui/jquery.ui.selectmenu.js
vendored
@ -321,7 +321,7 @@ $.widget( "ui.selectmenu", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_documentClick: {
|
_documentClick: {
|
||||||
click: function( event ) {
|
mousedown: function( event ) {
|
||||||
if ( this.isOpen && !$( event.target ).closest( "li.ui-state-disabled, li.ui-selectmenu-optgroup, #" + this.ids.button ).length ) {
|
if ( this.isOpen && !$( event.target ).closest( "li.ui-state-disabled, li.ui-selectmenu-optgroup, #" + this.ids.button ).length ) {
|
||||||
this.close( event );
|
this.close( event );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user