Skip to content

Commit 1a87017

Browse files
dcastilulivz
authored andcommitted
fix: anchor links not updating current URL (closes #1011) (#1014)
1 parent 2b40e7e commit 1a87017

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/@vuepress/core/lib/app/root-mixins/updateLoadingState.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
77
anchor.addEventListener('click', function (e) {
88
e.preventDefault()
9+
history.pushState(history.state, document.title, e.target.href)
910
window.scroll({
1011
top: e.target.offsetTop - 75,
1112
left: 0,

0 commit comments

Comments
 (0)