Skip to content
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

Continuity: Prevents history change handling when back navigation is already queued #1252

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

sabieber
Copy link
Member

@sabieber sabieber commented Jul 7, 2023

Chrome has some weird behaviour where it sometimes completes running all code of the current execution context (everything that wasn't postponed by setTimeout or async calls). This introduced a bug in the continuity history handling where a popStateEntry could actually be reverted automatically as the handleStateChange code ran after back navigation was intended and the back navigation and state change restore would cancel each other. We now use a simple flag to ensure the handleStateChange logic does not get executed when we previously issued a back navigation in popStateEntry.

This is heavily inspired by commit 7c08942 which did the same in the tycho history logic.

Fixes: OX-10192

Chrome has some weird behaviour where it sometimes completes running all code of the current execution context (everything that wasn't postponed by setTimeout or async calls).
This introduced a bug in the continuity history handling where a popStateEntry could actually be reverted automatically as the handleStateChange code ran after back navigation was intended and the back navigation and state change restore would cancel each other.
We now use a simple flag to ensure the handleStateChange logic does not get executed when we previously issued a back navigation in popStateEntry.

This is heavily inspired by commit 7c08942 which did the same in the tycho history logic.

Fixes: OX-10192
@sabieber sabieber added 🐛 Bugfix Contains only a small fix for an existing bug 👶🏻 Trivial Easy to review labels Jul 7, 2023
Co-authored-by: Andreas Haufler <aha@scireum.de>
@sabieber sabieber merged commit f6f17d8 into develop Jul 7, 2023
@sabieber sabieber deleted the feature/sbi/OX-10192 branch July 7, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bugfix Contains only a small fix for an existing bug 👶🏻 Trivial Easy to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants