Permalink
Browse files

Selectmenu: move button event binding in _drawButton

  • Loading branch information...
fnagel committed Nov 29, 2012
1 parent 080b5bc commit 71e744ad30eb400baa60b333f2d4b01cf30a7b28
Showing with 5 additions and 5 deletions.
  1. +5 −5 ui/jquery.ui.selectmenu.js
View
@@ -41,10 +41,6 @@ $.widget( "ui.selectmenu", {
this.ids = { id: selectmenuId, button: selectmenuId + "-button", menu: selectmenuId + "-menu" };
this._drawButton();
- this._on( this.button, this._buttonEvents );
- this._hoverable( this.button );
- this._focusable( this.button );
-
this._drawMenu();
// document click closes menu
@@ -106,7 +102,11 @@ $.widget( "ui.selectmenu", {
"class": "ui-selectmenu-button"
})
.append( this.button )
- .insertAfter( this.element );
+ .insertAfter( this.element );
+
+ this._on( this.button, this._buttonEvents );
+ this._hoverable( this.button );
+ this._focusable( this.button );
},
_drawMenu: function() {

0 comments on commit 71e744a

Please sign in to comment.