From 71e744ad30eb400baa60b333f2d4b01cf30a7b28 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 29 Nov 2012 19:54:10 +0100 Subject: [PATCH] Selectmenu: move button event binding in _drawButton --- ui/jquery.ui.selectmenu.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index e7ed22f5b5..f3400e6530 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -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() {