mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Revert "Offset: account for scroll when calculating position"
This reverts commit 2d715940b9.
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user