From c84acf07cbea49b7dd71e1f00cc737b8baa2acb8 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Wed, 16 Jul 2008 13:04:50 -0500 Subject: [PATCH] Fix the deprecated Position.withinIncludingScrollOffsets. [#196 state:resolved] --- CHANGELOG | 2 ++ src/deprecated.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index dfd629b36..5716c8568 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Fix the deprecated Position.withinIncludingScrollOffsets. [jddalton] + * Consolidate document.body getOffsetParent checks into a private utility method. [staaky, jddalton] * Fix issues with Element#cumulativeScrollOffset and Opera <9.5. [staaky, jddalton] diff --git a/src/deprecated.js b/src/deprecated.js index 43c141832..2228a03f7 100644 --- a/src/deprecated.js +++ b/src/deprecated.js @@ -67,8 +67,8 @@ var Position = { var offsetcache = Element.cumulativeScrollOffset(element), dimensions = Element.getDimensions(element); - this.xcomp = x + offsetcache[0]; - this.ycomp = y + offsetcache[1]; + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; this.offset = Element.cumulativeOffset(element); return (this.ycomp >= this.offset[1] &&