Skip to content

Commit 5944b1a

Browse files
fixup! fix(files): Add smooth animation via clicking on heading
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
1 parent 87ddce3 commit 5944b1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/plugins/headingAnchor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function anchorForHeading(heading) {
144144
*/
145145
function handleClick(event) {
146146
event.stopPropagation()
147+
event.preventDefault()
147148
event.target.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" })
148149
window.history.replaceState({}, '', event.target.getAttribute('href'))
149150
}

0 commit comments

Comments
 (0)