Skip to content
Permalink
Browse files

Selectmenu: close menu on other element mousedown not on click

  • Loading branch information
fnagel committed Oct 29, 2013
1 parent f3e4b24 commit 027d8d4cab27b89d3b1b137fbb8ce81c9fdafc54
Showing with 2 additions and 2 deletions.
  1. +1 −1 tests/unit/selectmenu/selectmenu_events.js
  2. +1 −1 ui/jquery.ui.selectmenu.js
@@ -49,7 +49,7 @@ test( "close", function () {
this.element.selectmenu( "open" ).selectmenu( "close" );

this.element.selectmenu( "open" );
$( "body" ).trigger( "click" );
$( "body" ).trigger( "mousedown" );
});


@@ -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 );
}

1 comment on commit 027d8d4

@jzaefferer

This comment has been minimized.

Copy link
Member

jzaefferer commented on 027d8d4 Oct 30, 2013

This killed the feature of clicking menu items to select. Rather important.

Please sign in to comment.
You can’t perform that action at this time.