Skip to content

Commit e6f1e9d

Browse files
committed
fixed: follow-up: selectmenu does not close when body is clicked, THX @zalog see fnagel#293
1 parent d122a31 commit e6f1e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 1 addition & 1 deletion
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 && !event.target.offsetParent ) {
162+
if ( self.isOpen && !$( event.target ).closest( "#" + self.ids[ 1 ] ).length ) {
163163
self.close( event );
164164
}
165165
});

0 commit comments

Comments
 (0)