From 3846417df7db3243159a70ea64dd009e70bf7417 Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Mon, 26 Jun 2023 07:27:16 +0200 Subject: [PATCH] docs: scroll to center of the view port (#4515) --- docs/_includes/extra/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/extra/script.js b/docs/_includes/extra/script.js index 748dd60a7..f5d1f92bf 100644 --- a/docs/_includes/extra/script.js +++ b/docs/_includes/extra/script.js @@ -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" }); } });