Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Selectmenu: improved event handling, fixed anchor problem when clicki…

…ng menu item
  • Loading branch information...
commit ee26baa997710ea870ab27f6d00b4efd01809859 1 parent 2be6e70
@fnagel fnagel authored
Showing with 4 additions and 7 deletions.
  1. +4 −7 ui/jquery.ui.selectmenu.js
View
11 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, {
Please sign in to comment.
Something went wrong with that request. Please try again.