Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Selectmenu: click on the text of the button did not open the menu in …

…Webkit browsers
  • Loading branch information...
commit 3a17a91f3001953418110b0417e195a7405d8d22 1 parent 91dde04
@fnagel fnagel authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  ui/jquery.ui.selectmenu.js
View
3  ui/jquery.ui.selectmenu.js
@@ -174,7 +174,6 @@ $.widget( "ui.selectmenu", {
this.menu.menu( "refresh" );
this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
- // select current item
item = this._getSelectedItem();
// make sure menu is selected item aware
this.menu.menu( "focus", null, item );
@@ -365,6 +364,7 @@ $.widget( "ui.selectmenu", {
var oldIndex = this.element[ 0 ].selectedIndex;
// change native select element
this.element[ 0 ].selectedIndex = item.index;
+ this._setText( this.buttonText, item.label );
this._setSelected( item );
this._trigger( "select", event, { item: item } );
@@ -374,7 +374,6 @@ $.widget( "ui.selectmenu", {
},
_setSelected: function( item ) {
- this._setText( this.buttonText, item.label );
// change ARIA attr
this.menuItems.find( "a" ).attr( "aria-selected", false );
this.menuItems.eq( item.index ).find( "a" ).attr( "aria-selected", true );

0 comments on commit 3a17a91

Please sign in to comment.
Something went wrong with that request. Please try again.