Fixed problem with dhtmlxMenu overflowing at the top in windows with scroll bars - notified the developers, so this fix is most likely to be included in the next dhtmlxmenu release

This commit is contained in:
Andreas Stöckel
2011-05-07 10:32:31 +00:00
parent 81ea3b639c
commit 2f99f7ff79
2 changed files with 5 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -382,11 +382,10 @@ function dhtmlXMenuObject(baseId, skin) {
x = 0;
}
if (y+h > my && this.menuY2 != null) {
y = srcY + srcH - h + 2;
if (y < 2) {
// Don't let the menu overflow at the top
y = 2;
}
var sy = Math.max(
(_isIE?document.documentElement:document.getElementsByTagName("html")[0]).scrollTop,
document.body.scrollTop);
y = Math.max(srcY + srcH - h - sy + 2, 2) + sy;
// open from top level
if (this.itemPull[id] != null && !this.context) {
if (this.itemPull[id]["parent"] == this.idPrefix+this.topId) y = y - this.base.offsetHeight;