mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: make isOpen check a guard clause in close method
This commit is contained in:
parent
6fd9d8f93c
commit
0d282630de
14
ui/jquery.ui.selectmenu.js
vendored
14
ui/jquery.ui.selectmenu.js
vendored
@ -233,13 +233,15 @@ $.widget( "ui.selectmenu", {
|
||||
|
||||
close: function( event ) {
|
||||
if ( this.isOpen ) {
|
||||
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 );
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user