aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/jquery.ui.selectmenu.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index 511760972..b116caa1e 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -62,7 +62,6 @@ $.widget( "ui.selectmenu", {
this._bind( this.button, this._buttonEvents );
this._drawMenu();
- this.refresh();
},
_drawButton: function() {
@@ -191,6 +190,12 @@ $.widget( "ui.selectmenu", {
},
open: function( event ) {
+ // init menu when initial opened
+ if ( !this.wasOpen ) {
+ this.refresh();
+ this.wasOpen = true;
+ }
+
var currentItem = this._getSelectedItem();
if ( !this.options.disabled ) {