vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Change URL hash when user scrolls the page

Open brc-dd opened this issue 3 years ago • 1 comments

Currently this code changes the URL hash when users click some link to a fragment identifier causing unwanted issues like #890 and #788.

https://github.com/vuejs/vitepress/blob/baf8083e668ce50a9d26d9398609e196237ebc95/src/client/theme-default/composables/outline.ts#L64-L152

Related SO thread: https://stackoverflow.com/q/7035896/11613622

I am thinking lets remove below line. The outline will still highlight current header. Just the hash won't change on URL.

https://github.com/vuejs/vitepress/blob/baf8083e668ce50a9d26d9398609e196237ebc95/src/client/theme-default/composables/outline.ts#L123

Side note, we also need to support outline: false.

brc-dd avatar Jul 03 '22 08:07 brc-dd

Removed that line for now, let's see if we can reintroduce that functionality properly.

brc-dd avatar Jul 14 '22 19:07 brc-dd