docs: scroll to center of the view port (#4515)

This commit is contained in:
Dmytro Kozlov 2023-06-26 07:27:16 +02:00 committed by GitHub
parent 969ee96106
commit 3846417df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ window.addEventListener("load", function () {
element = document.querySelector(selector(href));
}
if (element) {
element.scrollIntoView({ behavior: "smooth" });
element.scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" });
}
});