aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.selectmenu.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-02-26 01:15:49 +0100
committerFelix Nagel <info@felixnagel.com>2012-02-26 01:15:49 +0100
commitc5efddab2dc37b48d58d30fc78bd696d340c34c7 (patch)
treef287faec1ed0621edde8f3f845731ba30555336b /ui/jquery.ui.selectmenu.js
parent1fbf5cb4c723400fc883d8b13d92874fc81e15d7 (diff)
downloadjquery-ui-c5efddab2dc37b48d58d30fc78bd696d340c34c7.tar.gz
jquery-ui-c5efddab2dc37b48d58d30fc78bd696d340c34c7.zip
Selectmenu: small fix for _toggleAttr to make sure isOpen is not undefined
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r--ui/jquery.ui.selectmenu.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index 5465ed8ce..1f6e057e7 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -200,6 +200,7 @@ $.widget( "ui.selectmenu", {
this.button.trigger( "focus" );
}
+ this.isOpen = true;
this._toggleAttr();
if ( this.items && !this.options.dropdown ) {
@@ -225,15 +226,14 @@ $.widget( "ui.selectmenu", {
of: this.button
}, this.options.position ));
- this.isOpen = true;
this._trigger( "open", event );
}
},
close: function( event ) {
if ( this.isOpen ) {
- this._toggleAttr();
this.isOpen = false;
+ this._toggleAttr();
this._trigger( "close", event );
}
},
@@ -403,11 +403,11 @@ $.widget( "ui.selectmenu", {
_toggleAttr: function(){
if ( this.options.dropdown ) {
- this.button.toggleClass( 'ui-corner-top', !this.isOpen ).toggleClass( 'ui-corner-all', this.isOpen );
+ this.button.toggleClass( 'ui-corner-top', this.isOpen ).toggleClass( 'ui-corner-all', !this.isOpen );
}
- this.menuWrap.toggleClass( 'ui-selectmenu-open', !this.isOpen );
- this.menu.attr("aria-hidden", this.isOpen);
- this.button.attr("aria-expanded", !this.isOpen);
+ this.menuWrap.toggleClass( 'ui-selectmenu-open', this.isOpen );
+ this.menu.attr("aria-hidden", !this.isOpen);
+ this.button.attr("aria-expanded", this.isOpen);
},
_getCreateOptions: function() {