Selectmenu: make isOpen check a guard clause in close method

This commit is contained in:
Felix Nagel 2012-11-29 20:57:44 +01:00
parent 6fd9d8f93c
commit 0d282630de

View File

@ -233,13 +233,15 @@ $.widget( "ui.selectmenu", {
close: function( event ) {
if ( this.isOpen ) {
return false;
}
var id = this._getSelectedItem().find( "a" ).attr( "id" );
this.isOpen = false;
this._toggleAttr();
this.button.attr( "aria-activedescendant", id );
this.menu.attr( "aria-activedescendant", id );
this._trigger( "close", event );
}
},
widget: function() {