diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 339246304..76224fd7b 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -49,8 +49,6 @@ $.widget( "ui.selectmenu", { this._drawButton(); this._drawMenu(); - this._on( document, this._documentClick ); - if ( this.options.disabled ) { this.disable(); } @@ -196,6 +194,8 @@ $.widget( "ui.selectmenu", { this._toggleAttr(); this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); + this._on( this.document, this._documentClick ); + this._trigger( "open", event ); }, @@ -212,6 +212,8 @@ $.widget( "ui.selectmenu", { this.menu.menu( "focus", null, this._getSelectedItem() ); } + this._off( this.document ); + this._trigger( "close", event ); }, |