-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swipe back on mobile browser with getInitialProps flickers the previous page #10465
Comments
See my comments on #9833 |
This can be reproduced with desktop Safari as well. |
Here's an extremely simple isolated example: https://github.com/guigrpa/bug-report-nextjs-flicker (no dependencies apart from React and Next, latest versions of both). |
Having the same issue here Anyone knows exact reason why this happens?? it is because you swiped back the page before the page was rendered completely? |
same issue. |
above example, even though i add seven, fast swiping back to index page from data page makes a very short flickering. |
Any ETA on when this will be worked on/fixed? Does anybody know of any temporary workarounds? |
Any updates on this? I only have this issue on iPhones. |
@dirkjf personally, the approach I went for was invalidating the snapshot of the page that webkit generates.
|
Any updates on that? |
Same thing happens also with "getServerSideProps". Flickering happens only on IOS, on swipe, even with the "useSnapshotInvalidation" hack mentioned above by @TTiole. I still haven't found anything working for me. "next": "^13.1.2" |
Anybody has found a solution to this? The issue also appears when you try to implement modal close (via hash). The most annoying thing is not the flicker, but that in between frames while flickering it's showing Modal Close=>Model Open=>Modal close. Using both slightScroll with alternator mentioned above and document.body.style.opacity switch, but the issue persists. |
(on iOS both Chrome and Firefox also use Safari’s webkit browser engine, afaik.) |
I hope someone from vercel explains the reason for this bug |
I think this bug is because when you swipe back in Safari on iOS it uses a screenshot of the previous page during the transition but then Safari automatically refreshes the previous page once you get there. |
Any updates? This doesn't seem to be a frequent issue so there must be a specific reason why this starts happening... |
Same issue here, and it's very annoying for the users. Especially image flickering is hard on the eyes :/ |
Bug report
Describe the bug
On mobile browsers (tested with Chrome and Firefox), swiping back or forward on a dynamic page (one that gets data from
getInitialProps
) will sometimes "flash" the previous page while the content is loading. Here is a video that shows the problem.To Reproduce
index.js
data.js
Now, add
"seven"
to the data returned indata.js
, and notice the problem doesn't happen anymoreExpected behavior
No flash of the previous page when swiping forward or backward on mobile browser. This is what happens now vs this is what should happen
System information
The text was updated successfully, but these errors were encountered: