Author: bleathem
Date: 2014-01-24 23:54:34 -0500 (Fri, 24 Jan 2014)
New Revision: 23288
Modified:
branches/enterprise/3.3.1.SP4/framework/impl/src/main/javascript/prototype/prototype-1.7.js
branches/enterprise/3.3.1.SP4/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
RF-13493: Fixed the dropDownMenu in Chrome
Modified:
branches/enterprise/3.3.1.SP4/framework/impl/src/main/javascript/prototype/prototype-1.7.js
===================================================================
---
branches/enterprise/3.3.1.SP4/framework/impl/src/main/javascript/prototype/prototype-1.7.js 2014-01-21
08:12:12 UTC (rev 23287)
+++
branches/enterprise/3.3.1.SP4/framework/impl/src/main/javascript/prototype/prototype-1.7.js 2014-01-25
04:54:34 UTC (rev 23288)
@@ -3749,10 +3749,16 @@
function cumulativeScrollOffset(element) {
var valueT = 0, valueL = 0;
do {
- valueT += element.scrollTop || 0;
- valueL += element.scrollLeft || 0;
- element = element.parentNode;
- } while (element);
+ if (element != document.body) {
+ valueT += element.scrollTop || 0;
+ valueL += element.scrollLeft || 0;
+ } else {
+ document.documentElement.scrollTop
+ valueT += (("scrollTop" in document.documentElement) ?
document.documentElement.scrollTop : element.scrollTop ) || 0;
+ valueL += (("scrollLeft" in document.documentElement) ?
document.documentElement.scrollLeft : element.scrollLeft) || 0;
+ }
+ element = element.parentNode;
+ } while (element && element != document.documentElement);
return new Element.Offset(valueL, valueT);
}
Modified:
branches/enterprise/3.3.1.SP4/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
branches/enterprise/3.3.1.SP4/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2014-01-21
08:12:12 UTC (rev 23287)
+++
branches/enterprise/3.3.1.SP4/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2014-01-25
04:54:34 UTC (rev 23288)
@@ -522,9 +522,6 @@
var parOffset = Position.cumulativeOffset(this.element);
var divOffset = Position.cumulativeOffset(innerDiv);
var scrollOffset = Position.realOffset(this.element);
- var windowScroll = {};
- windowScroll.top = ('pageYOffset' in window) ? window.pageYOffset :
document.documentElement.scrollTop;
- windowScroll.left = ('pageXOffset' in window) ? window.pageXOffset :
document.documentElement.scrollLeft;
var deltaX = divOffset[0] - parOffset[0];
var deltaY = divOffset[1] - parOffset[1];
@@ -575,9 +572,10 @@
if (!foundPos) {
layerPos = this.calcPosition(listPos[0].jointPoint, listPos[0].direction)
}
- this.layer.style.left = layerPos.left + hOffset - deltaX - this.left -
(scrollOffset.left - windowScroll.left) + "px";
- this.layer.style.top = layerPos.top + vOffset - deltaY - this.top - (scrollOffset.top -
windowScroll.top) + "px";
+ this.layer.style.left = layerPos.left + hOffset - deltaX - this.left -
(scrollOffset.left - winOffset.left) + "px";
+ this.layer.style.top = layerPos.top + vOffset - deltaY - this.top - (scrollOffset.top -
winOffset.top) + "px";
+
this.layer.style.width = this.layer.clientWidth + "px";
this.layer.style.display=layer_display;
Show replies by date