Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upElement.getBoundingClientRect() and Element.getClientRects() do not take scrolling into account. #9651
Labels
Comments
|
@peterjoel Can you link to the part of the specification that suggests that they should? |
|
I was just going by the behaviour in Safari, Firefox and Chrome. The spec isn't incredibly clear, but it says:
If you follow the link on "transforms" and keep following the linked documents to this, you find:
Which seems to suggest that the transformations are relative to the viewport, not the document. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #9650.
These rectangles should be translated by
scrollTopandscrollLeft.Spec: https://drafts.csswg.org/cssom-view/#dom-element-getclientrects