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

fix(qwik-city): add explicit magic attr to select Link for SPA resume #6022

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

jordanw66
Copy link
Contributor

@jordanw66 jordanw66 commented Mar 17, 2024

Overview

Simple/partial fix for this issue: #5983

Resuming SPA after context loss with refresh/reload requires a Link on the page or it falls back to location.href on popstate, it initially relied on a Qwik-internal key attached to Links. My impression of upcoming v2 changes is that this might disappear.

Either way this PR fixes this potential problem simply by adding a magic attr explicitly and selecting on that instead.

I also removed the erroneous link:app attribute, this was added in the sync$ commit, as a check whether the Link was same-app or foreign, but this check got replaced in another PR with a better impl to just not attach the sync$ handler at all if it wasn't. There was no reason for it to exist at this point. Its presence in the API also seemed to be a workaround for linting complaining about it being on linkProps without being documented, this API didn't actually do anything at all, needless to say this was removed as well.

Copy link

netlify bot commented Mar 17, 2024

👷 Deploy request for qwik-insights pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ad46a8f

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@wmertens wmertens merged commit da0a2c2 into QwikDev:main Mar 17, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants