aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.selectmenu.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index 113c53e31..15019945f 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -144,7 +144,10 @@ $.widget( "ui.selectmenu", {
if ( flag ) that._trigger( "change", event, { item: item } );
- that.close( event, true);
+ if ( that.opened ) {
+ event.preventDefault();
+ that.close( event, true);
+ }
},
focus: function( event, ui ) {
var item = ui.item.data( "item.selectmenu" );
@@ -152,12 +155,6 @@ $.widget( "ui.selectmenu", {
that.focus = item.index;
}
});
-
- that._bind( that.list, {
- 'click': function( event ) {
- event.preventDefault();
- }
- });
// document click closes menu
that._bind( document, {