diff options
Diffstat (limited to 'ui/jquery.ui.selectmenu.js')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 1bfcb56ab..36917a58f 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -190,7 +190,8 @@ $.widget( "ui.selectmenu", { return; } - var _position = { + var currentItem, + _position = { of: this.button }; @@ -198,8 +199,8 @@ $.widget( "ui.selectmenu", { this._toggleAttr(); // do not change position if non default position options are set (needed for custom positioned popup menus) - if ( this.items && !this.options.dropdown && this.options.position.my == "left top" && this.options.position.at == "left bottom" ) { - var currentItem = this._getSelectedItem(); + if ( this.items && !this.options.dropdown && this.options.position.my === "left top" && this.options.position.at === "left bottom" ) { + currentItem = this._getSelectedItem(); // center current item if ( this.menu.outerHeight() < this.menu.prop( "scrollHeight" ) ) { this.menuWrap.css( "left" , -10000 ); |