-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure it has not already been reported
Version (i.e. v2.x.x)
1.0.1-alpha.212
Node.js version (i.e. 18.x, or N/A)
N/A
Operating system
None
Operating system version (i.e. 20.04, 11.3, 10, or N/A)
No response
Description
When calling window.history.pushState({}, "", "http://localhost/new-url") it forces a page navigation.
This feels unexpected as it only happens in FF / Safari. In Chrome, this does not happen, assuming because the polyfill never applies because the polyfill is natively supported.
Steps to Reproduce
import "https://cdn.jsdelivr.net/npm/@virtualstate/navigation@1.0.1-alpha.212/esnext/polyfill.js/+esm"
history.pushState({}, "", "http://localhost:9000/new-url")And the browser will try to do a new page navigation.
Expected Behavior
the browser should only update the URL in the history. It should not attempt to navigate.
Is there a way to opt-out of this behavior? As it is, I found it interesting in Chrome URLs automatically updated, but with the polyfill I have to call pushState() after calling my navigation handler, unlike in Chrome.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels