diff options
author | Felix Nagel <info@felixnagel.com> | 2010-11-13 02:05:13 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2010-11-13 02:05:13 +0100 |
commit | 9e64b8f1f90e5b19da49f5c9d417c3011b335831 (patch) | |
tree | d942d8d7d1de9a340ccb2681c6ba373c40b3736a | |
parent | 04876d37f1fbe4cd4e867a32b5cb09ee5c4cffc1 (diff) | |
download | jquery-ui-9e64b8f1f90e5b19da49f5c9d417c3011b335831.tar.gz jquery-ui-9e64b8f1f90e5b19da49f5c9d417c3011b335831.zip |
fixed: default max height only when address format is not defined
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 9254a8141..075d7b3c2 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -244,9 +244,9 @@ $.widget("ui.selectmenu", { // calculate default max height if(o.maxHeight) { //set max height from option - if (o.maxHeight < this.list.height()){ this.list.height(o.maxHeight); } + if (o.maxHeight < this.list.height()){ this.list.height(o.maxHeight); } } else { - if (($(window).height() / 3) < this.list.height()) { + if (!o.format && ($(window).height() / 3) < this.list.height()) { o.maxHeight = $(window).height() / 3 this.list.height(o.maxHeight); } @@ -388,6 +388,7 @@ $.widget("ui.selectmenu", { var self = this; var disabledStatus = this.newelement.attr("aria-disabled"); if(disabledStatus != 'true'){ + this._refreshPosition(); this._closeOthers(event); this.newelement .addClass('ui-state-active'); @@ -529,6 +530,7 @@ $.widget("ui.selectmenu", { // if its a native pop-up we need to calculate the position of the selected li if (o.style == "popup" && !o.positionOptions.offset) { var selected = this.list.find('li:not(.ui-selectmenu-group):eq('+this._selectedIndex()+')'); + // var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top); var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top); } this.list.position({ |