]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: selectmenu does not close when body is clicked, see https://github.com/fnagel...
authorFelix Nagel <info@felixnagel.com>
Tue, 28 May 2013 20:22:03 +0000 (22:22 +0200)
committerFelix Nagel <info@felixnagel.com>
Tue, 28 May 2013 20:22:03 +0000 (22:22 +0200)
ui/jquery.ui.selectmenu.js

index 12c676fd5a38771b24360ca2f23692c5f5c6417c..bcf64bd7236d6baac3927070b44542f140ee47cd 100644 (file)
@@ -159,7 +159,7 @@ $.widget("ui.selectmenu", {
                // document click closes menu
                $( document ).bind( "mousedown.selectmenu-" + this.ids[ 0 ], function( event ) {
                        //check if open and if the clicket targes parent is the same
-                       if ( self.isOpen && self.ids[ 1 ] != event.target.offsetParent.id ) {
+                       if ( self.isOpen && !event.target.offsetParent ) {
                                self.close( event );
                        }
                });