Fire the hashchange event even if the navigation changes only location.hash#7329
Fire the hashchange event even if the navigation changes only location.hash#7329genki wants to merge 4 commits intoQwikDev:mainfrom
location.hash#7329Conversation
|
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 🥲 |
wmertens
left a comment
There was a problem hiding this comment.
LGTM but really needs a test
gioboa
left a comment
There was a problem hiding this comment.
may I ask you to add the missing test here please?
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
hashchangeevent 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