diff options
author | Felix Nagel <info@felixnagel.com> | 2012-11-29 20:57:44 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-11-29 20:57:44 +0100 |
commit | 0d282630de1fa9b2cd937a0743c727903979e837 (patch) | |
tree | 4af1e8501b6effe240e3d2774b62aa87ec1302b0 /ui/jquery.ui.selectmenu.js | |
parent | 6fd9d8f93cf92d3059c620d5b4df81e4cf0bca19 (diff) | |
download | jquery-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.js | 14 |
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() { |