Ticket #2151: scrolloffset.patch
File scrolloffset.patch, 1.4 KB (added by , 15 years ago) |
---|
-
editor/_source/internals/fcktools_gecko.js
131 131 132 132 FCKTools.GetScrollPosition = function( relativeWindow ) 133 133 { 134 return { X : relativeWindow.pageXOffset, Y : relativeWindow.pageYOffset } ; 134 var x = 0; 135 var y = 0; 136 while ( relativeWindow && typeof relativeWindow.scrollTop == 'number' && typeof relativeWindow.scrollLeft == 'number' ) 137 { 138 x += relativeWindow.scrollLeft; 139 y += relativeWindow.scrollTop; 140 relativeWindow = relativeWindow.parentNode; 141 } 142 return { X : x, Y : y } ; 135 143 } 136 144 137 145 FCKTools.AddEventListener = function( sourceObject, eventName, listener ) -
editor/_source/classes/fckpanel.js
235 235 oPos.y -= nPos.y ; 236 236 } 237 237 238 // Plus the offsets provided by parent of the master iframe. 239 var oScrollPosition = FCKTools.GetScrollPosition( window.FCK.LinkedField.parentNode ) ; 240 oPos.x += oScrollPosition.X; 241 oPos.y += oScrollPosition.Y; 242 238 243 if ( this.IsRTL && !this.IsContextMenu ) 239 244 x = ( x * -1 ) ; 240 245