aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2016-02-09 00:17:25 +0300
committerOleg Gaidarenko <markelog@gmail.com>2016-02-09 00:24:22 +0300
commit49833f7795d665ff1d543c4f71f29fca95b567e9 (patch)
tree8bb8400965889d23a663b325a74eb006b573080f /src
parent9cb89bf91d034ec7166d9215e2f80fa765292975 (diff)
downloadjquery-49833f7795d665ff1d543c4f71f29fca95b567e9.tar.gz
jquery-49833f7795d665ff1d543c4f71f29fca95b567e9.zip
Revert "Offset: account for scroll when calculating position"
This reverts commit 2d715940b9b6fdeed005cd006c8bf63951cf7fb2. This commit provoked new issues: gh-2836, gh-2828. At the meeting, we decided to revert offending commit (in all three branches - 2.2-stable, 1.12-stable and master) and tackle this issue in 3.x. Fixes gh-2828
Diffstat (limited to 'src')
-rw-r--r--src/offset.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/offset.js b/src/offset.js
index f7ef79c3c..365041391 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -144,11 +144,8 @@ jQuery.fn.extend( {
}
// Add offsetParent borders
- // Subtract offsetParent scroll positions
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ) -
- offsetParent.scrollTop();
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ) -
- offsetParent.scrollLeft();
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
}
// Subtract parent offsets and element margins