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: hashchange should only be triggered for same page navigations #3768

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Apr 9, 2024

reverts parts of f6bd99e...49ea062

The original implementation by zonemeen was correct - 59e1773

hashchange should not be triggered when navigating between different pages

This PR also adds hash property in useData output for those who want to watch for hash change while navigating between pages - say from /foo#bar to /. Those who don't want this should stick with window.addEventListener('hashchange', ...)

It also emits correct event instance with oldURL and newURL for hashchange now.

@brc-dd brc-dd merged commit 2a9fc2a into main Apr 9, 2024
7 checks passed
@brc-dd brc-dd deleted the fix/hashchange branch April 9, 2024 08:15
niceplugin added a commit to niceplugin/vitepress-ko that referenced this pull request Apr 21, 2024
niceplugin added a commit to niceplugin/vitepress-ko that referenced this pull request Apr 21, 2024
* docs: add Stormkit as deployment platform (vuejs#3751)

* docs: adjust install and init commands

* docs: update default-theme sidebar type (vuejs#3715)

* docs: make vue as peer dependency section clearer (vuejs#3687)

* fix: hashchange should only be triggered for same page navigations (vuejs#3768)

* chore: bump deps, lock mdit to v2.0

* release: v1.1.0

* build: set up sort-package-json

* docs: added nginx deployment documentation (vuejs#3770)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant