Page scrolls down on load
See original GitHub issueDescribe the bug
When the page loads, the window scrolls down to the first element. This means that the margin-top applied above the first element is skipped over.
Reproduction
https://github.com/ezfe/scroll-issue-reproduction
Use npm run dev and open the page. The text will appear at the top of the screen, with the margin-top scrolled up above the top of the screen.
Appears to only happen in Safari.
Logs
[Log] [vite] connecting... (client, line 184)
[Log] [vite] connected. (client, line 211)
System Info
z
System:
OS: macOS 12.3
CPU: (8) arm64 Apple M1
Memory: 111.86 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.4.0 - /opt/homebrew/bin/node
npm: 8.3.2 - /opt/homebrew/bin/npm
Browsers:
Edge: 98.0.1108.56
Firefox: 98.0
Safari: 15.4
npmPackages:
@sveltejs/adapter-static: next => 1.0.0-next.28
@sveltejs/kit: next => 1.0.0-next.278
svelte: ^3.44.0 => 3.46.4
Severity
annoyance
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
What is causing this web page to scroll down when it loads?
When I load the page, it scrolls down to a specific div. I already spent 2 hours trying to find out which code...
Read more >Auto Scroll Down on Page Load Using jQuery - Medium
To Auto Scroll Down on Page Load using jQuery, we use $( document ).ready() that helps us to check the page Document Object...
Read more >Why does my web-page keep scrolling down by itself ... - Quora
You may have a mouse that automatically scrolls when the scroll wheel is clicked. Trying clicking on the mouse wheel to stop this...
Read more >Page scrolls down on load? - General - Forum | Webflow
Hi, when I load the page https://nl.cro.cafe/, it automatically scrolls down to a section showing images of people which is almost at the...
Read more >Team Site Scroll down middle of the page on load
Scrolling doesn't apply for whole page, instead it applies to specific div. While other sites don't have similar scenario and they works with ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ahh, yes, that was me in the discord. I was able to create a fail/pass test only by adding webkit to the Playwright config, and doing so exposed 13 other failing tests. Not sure how the core team wants to handle that, but I’m going to take a look at the other failing webkit enabled tests.
I have the same issue when loading sumsub’s widget in iframe… Not sure how to reproduce it 😦