Selectmenu: move button event binding in _drawButton

This commit is contained in:
Felix Nagel 2012-11-29 19:54:10 +01:00
parent 080b5bca0a
commit 71e744ad30

View File

@ -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
@ -107,6 +103,10 @@ $.widget( "ui.selectmenu", {
})
.append( this.button )
.insertAfter( this.element );
this._on( this.button, this._buttonEvents );
this._hoverable( this.button );
this._focusable( this.button );
},
_drawMenu: function() {