-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When clicking on a hash link that has the data-sveltekit-replacestate attribute, the expected behavior is to update the URL without pushing a new history entry. However, the bug causes the history object to be pushed even when the data-sveltekit-replacestate attribute is used, resulting in unexpected navigation history behavior.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-jsaxq9
Steps to reproduce the behavior:
- Create a new SvelteKit project or open an existing one
- Add a hash link with the
data-sveltekit-replacestateattribute, like the following:<a data-sveltekit-replacestate href="#c">c</a> - Start the development server and navigate to the page containing the hash link
- Click on the link with the attribute
- Observe the URL change and the browser's navigation history
Logs
No response
System Info
Not applicableSeverity
annoyance
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working