Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

position().top calculated incorrectly #4149

Closed
alons1 opened this issue Aug 5, 2018 · 3 comments
Closed

position().top calculated incorrectly #4149

alons1 opened this issue Aug 5, 2018 · 3 comments

Comments

@alons1
Copy link

alons1 commented Aug 5, 2018

Since upgrading from 3.1.1 to 3.3.1 i'm having a lot of issues with .top values.

On many places in my web app this property now returns the top value from it's parent.
on 3.1.1 it returned for me (at least in some places) the top value from the top of the page. (nor the parent or the element that i'm testing have any position attributes or anything special).

I can't seem to understand the exact use case in order to create an example, but switching between 3.1.1 and 3.3.1 is definitely returning very different values for me in more than one place...
And the issue is cross browser.

@alons1
Copy link
Author

alons1 commented Aug 5, 2018

Ok I am now able to reproduce it.
When the div that i am testing is inside a table, the 'top' value is returned as '1'.
When you remove the table, it is returned from the top of the page.

If you switch to jQuery 3.2.1 it is returned from the top of the page in both cases.

http://jsfiddle.net/sectioni/usd8rwLz/8/

There may be other cases that produce this issue. Not only with tables.

@alons1 alons1 changed the title position().top calculated differently position().top calculated incorrectly Aug 5, 2018
@dmethvin
Copy link
Member

dmethvin commented Aug 5, 2018

This looks like the same issue as gh-4044 which is still open?

@timmywil
Copy link
Member

timmywil commented Aug 5, 2018

Agreed, this should be addressed by gh-4044.

@timmywil timmywil closed this as completed Aug 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Feb 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants