Join the Webstudio community

Updated 6 months ago

Scrolling issues when navigating between pages on iPhone Safari

At a glance
Does anyone know why the scrolling is bugging when going to a new page and going back on iPhone safari? When I swipe back I get to the top of the previous page
O
p
I
40 comments
share a link please
is your scrolling using some custom script you wrote?
I’ve set my html { scroll behavior: smooth} because it was not scrolling smooth, no further scripts or anything
I just tested on android chrome:
  1. open the site
  2. scroll down
  3. type google.com, opeen
  4. swipe back
scroll position stayed, is that how you test?
Oh I mean inside my website when I go to different page and back the scroll position won’t stay the same
I think it’s because I use /#home etc
To navigate in different pages and then send it to the right section ID
so
1.click on navgiation point
2.see scrolling
  1. swipe back
  2. expect it scrolls back
I see in android chrome it scrolling back
even if i click to different menu points, then go back, it goes to the last one, first
Yes I think it’s because of the ID’s
If I swipe back it goed to the section I’d everything
it goes to the previously selected section for me
I need someone with ios to verify its a bug with ios somehow
Yes it’s an iOS thing for sure it does not bug in my browser either
it may be an actual ios bug
Okay it’s 100% safari bug
When I use brave on my iPhone it all worlds just fine
Okay it’s not safari it’s web studio for sure
It’s bugging out so bad with links and page sections
Scrolling goes all over the place and does not remember last position + sometimes goes to bottom of new page that has not ever been loaded even
Did you test the same thing on some other site or how did you decide it's only in ws?
Can you try the same thing without smooth scrolling?
Yup I removed smooth scrolling already
All my other webflow sites that I made do not do that
I'll try to make a screen recording
That means very little. Maybe they have a workaround in place. To properly test it you need a vanilla site without anything on it
Yes I’m not sure at all but this is what I’m seeing
Swipe back doesn't work well on any client router on IOS
Only native server side routers has no issues
I mean on IOS the only way to have no issues with swipe navigation on web I know is native navigation only
What @Ivan Starkov is saying is that ios has a known bug with client-side navigation, its the api that allows us transition between different pages without reloading entirely, making switching pages fast.

He says it sometimes even works and sometimes it doesn't. So the only option right now for ios is to wait until this is fixed on OS level.

It works on Webflow because they don't optimize page transitions, click on a link results in a regular full page reload.
Its a bit of random anyway like I had 10+ navigation without issues
Ooh! I didn’t know that, thanks for letting me know it’s amazing how helpful this can be
For now I’ll leave it as is then
Add a reply
Sign up and join the conversation on Discord