Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Safari scroll position jump

See original GitHub issue

This one took a while to track down!

A combination of:

  1. Viewport tag: <meta name="viewport" content="width=device-width, initial-scale=1">
  2. Page content height being less than the viewport height

Results in the scroll position jumping position on each keypress within the textarea.

Reproduction app:

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

dbertellacommented, Mar 19, 2018

Not sure if it’s the same problem but this morning I found out there is an issue in ios 11 related to autosize. It’s not going to be fixed, they said it’s an ios bug and the solution is to exclude the autosize > For Autosize, I think the best thing to do is to exclude it for iOS users. (not a very good solution)

You can reproduce the issue changing the content of the last textarea of the page with an iphone with ios 11

More info here:

I temporary switch to another library that seems to work better at least for me:

dburlescommented, Dec 15, 2017

@FrancescoCioria I’m was on an iPhone 6s on iOS 11.

This means that every time you type, no matter the scrolling position in that moment, after you’ve typed the scroll position changes?

Actually, you have to be scrolled past the textarea. You should see the scroll position jump bringing it into focus. It’s definitely not a behavior of Safari as removing onChange and value results in the expected behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Safari jumps to the top of the previous page
When I am using Safari (iPhone iOS 15.4) any time I hit the back button, it brings me to the top of the...
Read more >
Mobile Safari: JS event for jump to last scroll position on refresh
Is there a Javascript event that I can hook into that fires when the page is refreshed, and Safari 'jumps' back to the...
Read more >
Change to position fixed on iOS Safari while scrolling
Element will usually flicker, and disappear until scrolling has stopped completely. Just force GPU acceleration by adding transform: translate3d(0,0,0); to ...
Read more >
How To Prevent Scrolling The Page On iOS Safari 15 - PQINA
If you're browsing this page on iOS Safari, scroll up and down a bit to see the height stays fixed no matter of...
Read more >
iOS 15 Beta 5 - Safari doesn't remember scroll position on ...
This has been a bug with iOS for years. It does it with all browsers. One of the biggest frustrating things iOS has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found