Fixed problem with context menu opening into the wrong direction if a vertical scrollbar is available. Notified developers.

This commit is contained in:
Andreas Stöckel 2011-05-08 19:57:01 +00:00
parent 13b4bb3e75
commit 3906423d4a
2 changed files with 2 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1523,8 +1523,7 @@ dhtmlXMenuObject.prototype._autoDetectVisibleArea = function() {
this.menuX2 = this.menuX1+(window.innerWidth||document.body.clientWidth);
this.menuY1 = Math.max((_isIE?document.documentElement:document.getElementsByTagName("html")[0]).scrollTop, document.body.scrollTop);
// this.menuY2 = this.menuY1+(_isIE?(document.documentElement?Math.max(document.documentElement.clientHeight:document.body.clientHeight):window.innerHeight);
this.menuY2 = this.menuY1+(_isIE?Math.max(document.documentElement.clientHeight||0,document.documentElement.offsetHeight||0,document.body.clientHeight||0):window.innerHeight);
this.menuY2 = this.menuY1+document.documentElement.clientHeight;
}
/* inner - returns true if prognozided polygon layout off the visible area */
/*dhtmlXMenuObject.prototype._isInVisibleArea = function(x, y, w, h) {