-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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: update page store when URL hash is changed from the address bar #10202
fix: update page store when URL hash is changed from the address bar #10202
Conversation
🦋 Changeset detectedLatest commit: cede6c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
#9548 looks to be addressing the same issue |
The draft went stale. I figured out how to resolve the issue and implement the necessary tests |
Reading this section on MDN it says: "Browsers tend to handle the popstate event differently on page load. Chrome (prior to v34) and Safari always emit a popstate event on page load, but Firefox doesn't." --> Could someone who has access to Safari check whether or not this change results in an unwanted update of the page store on initial page load? Because that shouldn't happen, and if it does, we need some additional boolean I guess to not fire on first page load. As for the TODO in the code: I think doing it in the else block is correct, you can remove that comment. |
This doesn't happen for me on MacOS Safari 17. |
I just checked with Safari on iOS and MacOS, there is no unwanted update of the page store on initial page load.
This doesn't happen to me on Safari 16.5.1 (iOS and MacOS).
Okay, thank you for the feedback. |
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.
Thank you!
Fixes #9374
Closes #9548
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.