IE10 - page scrolled down immediately on load #20582
Labels
stale?
Issue that may be closed soon due to the original author not responding any more.
type: bug
An issue or pull request relating to a bug in Gatsby
type: upstream
Issues outside of Gatsby's control, caused by dependencies
Description
When opening any gatsby page in IE10, the page is immediately scrolled down by a couple of hundred pixels (varies by screen size).
Steps to reproduce
Using IE10, go to https://www.gatsbyjs.org/ for example.
Expected result
Once page loads and hydrates, it should stay at the top (not scrolled down)
Actual result
The page is scrolled down.
Environment
Gatsby 2.15.9
Details
After some digging around and going through past releases, looks like the regression was introduced by this IE10-specific fix: #13027 (version 2.3.7 and onward)
The call to
document.documentElement.doScroll()
in https://github.com/mikaelkristiansson/domready/blob/0e1e0fd082cc161b909f809390782e7f70396cc4/src/ready.js#L19 seems to be causing the page to automatically scroll on loadThe text was updated successfully, but these errors were encountered: