Author: pyaschenko
Date: 2009-02-17 17:43:53 -0500 (Tue, 17 Feb 2009)
New Revision: 12685
Modified:
trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js
Log:
https://jira.jboss.org/jira/browse/RF-6235
Modified: trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js
===================================================================
--- trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js 2009-02-17
17:27:00 UTC (rev 12684)
+++ trunk/framework/impl/src/main/javascript/prototype/prototype-1.6.0.3.js 2009-02-17
22:43:53 UTC (rev 12685)
@@ -2012,9 +2012,18 @@
cumulativeOffset: function(element) {
var valueT = 0, valueL = 0;
do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
+ // RF: added by PY
+ if($(element).getStyle('position') == 'fixed') {
+ var pageOffsets = document.viewport.getScrollOffsets();
+ valueT += pageOffsets[1] + element.offsetTop;
+ valueL += pageOffsets[0] + element.offsetLeft;
+ break;
+ } else {
+ // RF: end
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ } // RF: added by PY
} while (element);
return Element._returnOffset(valueL, valueT);
},