Selectmenu: close menu on other element mousedown not on click

This commit is contained in:
Felix Nagel 2013-10-29 20:54:16 +01:00
parent f3e4b24485
commit 027d8d4cab
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ test( "close", function () {
this.element.selectmenu( "open" ).selectmenu( "close" );
this.element.selectmenu( "open" );
$( "body" ).trigger( "click" );
$( "body" ).trigger( "mousedown" );
});

View File

@ -321,7 +321,7 @@ $.widget( "ui.selectmenu", {
},
_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 ) {
this.close( event );
}