Skip to content

Commit

Permalink
Fix scroll to
Browse files Browse the repository at this point in the history
  • Loading branch information
Kale-Ko committed Feb 3, 2022
1 parent e4dba26 commit 90b1d8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
document.title = main.children.item(0).innerHTML + " - " + main.children.item(1).innerHTML
document.querySelector("html").lang = lang

if (scrollto != "top") document.querySelector("#" + scrollto).scrollIntoView()
if (scrollto != "top") document.querySelector("#" + scrollto).scrollIntoView({ block: "center", inline: "center" })

fetch("./pages/" + lang + "/sidebar.md").then(res => {
if (res.status != 404) {
Expand Down

0 comments on commit 90b1d8e

Please sign in to comment.