Include the offsetParents when locating the target element's position.#42
Include the offsetParents when locating the target element's position.#42woodcoder wants to merge 8 commits intoessetwide:v2from
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.