From 2fd705cf4049b63bb4940dbbfb268652174782af Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 28 May 2013 22:22:03 +0200 Subject: [PATCH] fixed: selectmenu does not close when body is clicked, see https://github.com/fnagel/jquery-ui/issues/293 --- ui/jquery.ui.selectmenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 12c676fd5..bcf64bd72 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -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 ); } }); -- 2.39.5