summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2010-10-08 00:21:05 +0200
committerFelix Nagel <info@felixnagel.com>2010-10-08 00:21:05 +0200
commit95d115db493c43df18650e0bf62ab75715814bad (patch)
treeeb496cae7b0f10c3ee8185fbf2a5dcfb3e233d6a
parentef4077d4957027563edf7ae0a96c3b1998cca584 (diff)
downloadjquery-ui-95d115db493c43df18650e0bf62ab75715814bad.tar.gz
jquery-ui-95d115db493c43df18650e0bf62ab75715814bad.zip
fixed: widget placed a the very top of a page, thx to phazei
-rw-r--r--ui/jquery.ui.selectmenu.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index d24e58dd7..7505f0a15 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -528,6 +528,9 @@ $.widget("ui.selectmenu", {
// check if there's enough room to expand to the bottom
if ((menuTop + listHeight) > (viewportHeight + pageScroll)) {
menuTop -= listHeight;
+ //check top
+ } else if ((menuTop - pageScroll) < (listHeight)) {
+ menuTop += this.newelement.height() + 4; // FIMXE: this is quick & dirty but we'll change to position
} else {
if (this.newelement.is('.'+this.widgetBaseClass+'-popup')) {
var scrolledAmt = this.list[0].scrollTop;