-
Notifications
You must be signed in to change notification settings - Fork 10
Include the offsetParents when locating the target element's position. #42
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
base: v2
Are you sure you want to change the base?
Conversation
|
@woodcoder Thank you Andy! We will make some tests and (hopefully) in few days give you a feedback. |
|
@woodcoder Hello! Nice that you want work with us on it! |
…viewport." This reverts commit 4ac4f19.
|
Hi @menosprezzi Thanks for the library! I'm sorry I didn't see the test page -- I've now looked and you're right the last commit fails in the way you show. Interestingly my original PR commit 6a1c0a1 is fine with these tests. My final commit was to fix an issue with a translate3d transformed element in my local project, but it's obviously breaking other situations so I've reverted that commit. |
…t forget to take into account the scrollY position for the top.
|
I added a test that's similar to the situation in my local project and pushed a fix that seems to work for this and all the other tests (I wasn't taking into account the scrollY position). |
|
Wow. Right, we have problems. In the |
…sition when targeting elements positioned relatively to fixed parents.

This change totals up the
offsetLeftandoffsetTops of the target element and all itsoffsetParents to hopefully correctly locate elements that are inside fixed positioned elements, for example.