aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.selectmenu.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-11-29 20:57:44 +0100
committerFelix Nagel <info@felixnagel.com>2012-11-29 20:57:44 +0100
commit0d282630de1fa9b2cd937a0743c727903979e837 (patch)
tree4af1e8501b6effe240e3d2774b62aa87ec1302b0 /ui/jquery.ui.selectmenu.js
parent6fd9d8f93cf92d3059c620d5b4df81e4cf0bca19 (diff)
downloadjquery-ui-0d282630de1fa9b2cd937a0743c727903979e837.tar.gz
jquery-ui-0d282630de1fa9b2cd937a0743c727903979e837.zip
Selectmenu: make isOpen check a guard clause in close method
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r--ui/jquery.ui.selectmenu.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index a6ce85f0c..80f40fb23 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -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() {