-
-
Notifications
You must be signed in to change notification settings - Fork 434
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
fix chromeIOS and edgeIOS browser back button problems #1999
base: v1
Are you sure you want to change the base?
fix chromeIOS and edgeIOS browser back button problems #1999
Conversation
Seems like this might require more than just a list of browsers. All third party browsers on iOS are essentially glorified Safari webviews. So this issue would likely exist in every single browser on iOS apart from Safari itself. Perhaps it would be a good idea to change the check to "is ios and not safari" |
@RobertBoes This issue was also present in Safari itself in the past few weeks, but it was resolved within just a few days. I’m not entirely sure, but I think it received an update. I believe the issue will be completely resolved once the browsers receive a new version. |
if (isChromeIOS) { | ||
// Defer history.replaceState to the next event loop tick to prevent timing conflicts. | ||
// Ensure any previous history.pushState completes before replaceState is executed. | ||
setTimeout(() => window.history.replaceState(cloneSerializable(page), '', page.url)) | ||
} else { | ||
window.history.replaceState(cloneSerializable(page), '', page.url) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, why did you delete this block of code? Wouldn't it just need to be updated to isChromeIOS || isEdgeIOS
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During my testing, I observed that when navigating from one page to another, the replaceState function is called first, followed by pushState, and then replaceState is triggered again. For example, when transitioning from the home page to the dashboard, the browser would first process the home page with replaceState, then execute pushState for the dashboard page, and afterward call replaceState again. With this sequence, the back navigation worked, but I had to click the back button twice to return to the previous page. After adjusting the replaceState function, the issue of adding the same page twice was resolved, and now a single back button click is enough to return to the previous page.
any updates on this ? |
i don't have any solution for this issues |
No description provided.