-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fire the hashchange event even if the navigation changes only location.hash
#7329
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
base: main
Are you sure you want to change the base?
Conversation
|
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
it would be great if you add a test for it |
@genki Could you add a test for it ? |
@JerryWu1234 Sorry currently I can't take a time for a while 🥲 |
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.
LGTM but really needs a test
What is it?
Description
I am making an app with Qwik that is using SPA navigation between pages including URL fragment.
Currently, the SPA navigation doesn't fire the
hashchange
event if the change of URL is only the hash fragment because it is usinghistory.pushState
.This is not the standard behaviour of the browser.
So I have changed this
location.hash = ...
due to fire the hashchange event.Checklist
pnpm change