Deprecated.js needs the deltaX and deltaY added back.
Reported by John-David Dalton | June 30th, 2008 @ 05:08 PM | in 1.6.0.3
Before the recent patches
I had initially removed the this.deltaX and this.deltaY compensations because they were
not needed when things were being calculated wrongly (before Sundays patches).
Now that those methods are working this needs to be reverted
(add back the - this.deltaX and this.deltaY).
This will fix Firefox, Opera 9.25. 9.5, Safari 3.
IE will still fail on them but thats a deeper issue (its getting the offsetParent() of
document.body and adding its offset where it would normally be getting HTML element
(inconsistent with other browsers and add its offset values which are 0).
It might have something to do with it being an absolutly positioned element.
(nicks functional tests don't appear off and the dom_test unit test pass).
(deprecated.js)
withinIncludingScrolloffsets:
function(element, x, y) {
var offsetcache = Element.cumulativeScrollOffset(element),
dimensions = Element.getDimensions(element);
this.xcomp = x + offsetcache[0];
this.ycomp = y + offsetcache[1];
should be:
withinIncludingScrolloffsets: function(element, x, y) {
var offsetcache = Element.cumulativeScrollOffset(element),
dimensions = Element.getDimensions(element);
this.xcomp = x + offsetcache[0] - this.deltaX;
this.ycomp = y + offsetcache[1] - this.deltaY;
Comments and changes to this ticket
-
John-David Dalton June 30th, 2008 @ 05:08 PM
- → State changed from new to bug
-
GitHub Robot July 16th, 2008 @ 08:10 PM
- → State changed from bug to resolved
(from [c84acf07cbea49b7dd71e1f00cc737b8baa2acb8]) Fix the deprecated Position.withinIncludingScrollOffsets. [#196 state:resolved]
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
