Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

A fix for getting scrollTop position on the latest Chrome 61 - #14

Open
vmarta wants to merge 5 commits into
masterfrom
chrome-61-scrollTop
Open

A fix for getting scrollTop position on the latest Chrome 61#14
vmarta wants to merge 5 commits into
masterfrom
chrome-61-scrollTop

Conversation

@vmarta

@vmarta vmarta commented Oct 24, 2017

Copy link
Copy Markdown

Chrome introduced a breaking change in its latest Chrome 61 on Android: the scrolling element is now assigned to <html> (it used to be <body>). For moving forward, let's use a more standard way to retrieve the correct scrolling element: document.scrollingElement. For those browsers that do not support it yet, it will fallback to <html>.

References:
https://stackoverflow.com/questions/45061901/chrome-61-body-doesnt-scroll
https://transitory.technology/scrollingelement/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant