]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectmenu: close menu on other element mousedown not on click
authorFelix Nagel <info@felixnagel.com>
Tue, 29 Oct 2013 19:54:16 +0000 (20:54 +0100)
committerFelix Nagel <info@felixnagel.com>
Tue, 29 Oct 2013 19:54:16 +0000 (20:54 +0100)
tests/unit/selectmenu/selectmenu_events.js
ui/jquery.ui.selectmenu.js

index 182c0cd1b9809d1f752fad2596ab90901bf00901..2c10b4c87d63c2e08878425d1079a6ecd08d3eb9 100644 (file)
@@ -49,7 +49,7 @@ test( "close", function () {
        this.element.selectmenu( "open" ).selectmenu( "close" );
 
        this.element.selectmenu( "open" );
-       $( "body" ).trigger( "click" );
+       $( "body" ).trigger( "mousedown" );
 });
 
 
index 69f8631081545c5cc6b31697ed327e1f6d354352..5c13a1619dbb791cce4b828f047bb1afa2c83ea4 100644 (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 );
                        }