Skip to content

Commit 2fd705c

Browse files
committed
fixed: selectmenu does not close when body is clicked, see #293
1 parent e65043c commit 2fd705c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.selectmenu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ $.widget("ui.selectmenu", {
159159
// document click closes menu
160160
$( document ).bind( "mousedown.selectmenu-" + this.ids[ 0 ], function( event ) {
161161
//check if open and if the clicket targes parent is the same
162-
if ( self.isOpen && self.ids[ 1 ] != event.target.offsetParent.id ) {
162+
if ( self.isOpen && !event.target.offsetParent ) {
163163
self.close( event );
164164
}
165165
});

0 commit comments

Comments
 (0)