Corrige scroll no deseado tras carga de página
Al integrar el menú lateral (sidebar) en el `div #mdbook` el efecto del `scrollIntoView()` también afecta al contenido del documento desplazando toda la página.
This commit is contained in:
parent
8b75f72a44
commit
1094435a38
1 changed files with 1 additions and 1 deletions
2
website/doc/theme/book.js
vendored
2
website/doc/theme/book.js
vendored
|
|
@ -548,7 +548,7 @@ function playground_text(playground) {
|
|||
var activeSection = document.getElementById("sidebar").querySelector(".active");
|
||||
if (activeSection) {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
||||
activeSection.scrollIntoView({ block: 'center' });
|
||||
// activeSection.scrollIntoView({ block: 'center' });
|
||||
}
|
||||
})();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue