]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: follow-up: selectmenu does not close when body is clicked, THX @zalog see...
authorFelix Nagel <info@felixnagel.com>
Wed, 29 May 2013 17:58:50 +0000 (19:58 +0200)
committerFelix Nagel <info@felixnagel.com>
Wed, 29 May 2013 17:58:50 +0000 (19:58 +0200)
ui/jquery.ui.selectmenu.js

index 7b122d192461191ce3976c283b1f6434599e6529..49f4d2ba3f8a308dcc38952ec66892078785f340 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 && !event.target.offsetParent ) {
+                       if ( self.isOpen && !$( event.target ).closest( "#" + self.ids[ 1 ] ).length ) {
                                self.close( event );
                        }
                });