Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up.position on table rows inside a relative div container gives different results based on scroll position #1708
Comments
mgol
added
the
Bug
label
Oct 16, 2014
mgol
added this to the 3.0.0 milestone
Oct 16, 2014
This comment has been minimized.
This comment has been minimized.
|
@mikesherov Can I get your review on this? |
timmywil
added
the
Offset
label
Jan 30, 2015
timmywil
removed this from the 3.0.0 milestone
Jan 30, 2015
timmywil
added this to the 3.0.0 milestone
May 5, 2015
timmywil
self-assigned this
May 5, 2015
timmywil
added
the
Has Pull Request
label
May 8, 2015
timmywil
closed this
in
2d71594
May 12, 2015
timmywil
added a commit
that referenced
this issue
May 12, 2015
markelog
added a commit
that referenced
this issue
Nov 10, 2015
dmethvin
removed
the
Has Pull Request
label
Jan 7, 2016
dmethvin
modified the milestones:
1.12/2.2,
3.0.0
Jan 7, 2016
dmethvin
referenced this issue
Jan 15, 2016
Closed
$.position in v1.12.0 gives different result for top than v1.11.3 in Chrome+Firefox #2836
markelog
removed this from the 1.12.0/2.2.0 milestone
Feb 8, 2016
This comment has been minimized.
This comment has been minimized.
markelog
reopened this
Feb 8, 2016
This comment has been minimized.
This comment has been minimized.
|
Changing this sounds like a breaking change so we might need to do it in 3.0.0 or wait for 4.0.0. I've added the "Needs review" label so that we don't forget about this doubt of mine. |
mgol
added
the
Needs review
label
Feb 8, 2016
This comment has been minimized.
This comment has been minimized.
Why? |
This comment has been minimized.
This comment has been minimized.
|
Hmm, OK, maybe not. I mean, this will surely break some code but it may be considered a bug fix due to the description in the API. I'd wait for fixes for edge cases that may break some code at least to a minor release, though. I'll set the milestone to 3.1.0 for now so that we don't forget; we can reschedule later. |
mgol
removed
the
Needs review
label
Feb 8, 2016
mgol
added this to the 3.1.0 milestone
Feb 8, 2016
This comment has been minimized.
This comment has been minimized.
|
It's not clear exactly what is going on with this, whether the original report was even a bug or not. We could definitely use some better unit tests from somebody who knew what the right answers were. |
timmywil
removed their assignment
Sep 27, 2016
timmywil
modified the milestones:
3.2.0,
3.3.0
Mar 6, 2017
timmywil
modified the milestones:
3.3.0,
3.2.0
Mar 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Per @mgol's comment, I think making this change in 4.0 is the safest option. |
mgol commentedOct 16, 2014
Originally reported by ripdog: http://bugs.jquery.com/ticket/15239
The docs for .position() clearly state that they return the "current position of an element relative to the offset parent." - explicitly not the position based on the viewport. However, .position does report different results based on where it is moved on the page due to scrolling.
Here's a fiddle: http://jsfiddle.net/6g5upsvq/ Click the button, then scroll and click it again. The .offsetTop direct from the DOM stays constant, but .position changes.