mirror of
https://github.com/minio/docs.git
synced 2025-07-30 07:03:26 +03:00
Fix anchor scrolling issue on Webkit browsers (#669)
This commit is contained in:
@ -14,7 +14,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
})();
|
||||
|
||||
// --------------------------------------------------
|
||||
// Dynamic sidebar scroll on read-mode.
|
||||
// Dynamic sidebar scroll on non read-mode.
|
||||
// This'll allow the sidebar to display all content,
|
||||
// without scrolling the body.
|
||||
// --------------------------------------------------
|
||||
@ -54,12 +54,21 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
|
||||
// Make the sidebar is scrollable.
|
||||
sidebarEl.classList.remove("inactive");
|
||||
|
||||
// Scroll to hash
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
var el = document.querySelector(hash);
|
||||
if (el) {
|
||||
el.scrollIntoView();
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
|
||||
document.addEventListener("scroll", (e) => {
|
||||
setSidebarHeight();
|
||||
});
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
// Read mode
|
||||
// --------------------------------------------------
|
||||
|
@ -48,6 +48,8 @@
|
||||
.content {
|
||||
@include breakpoint-min(breakpoints(lg)) {
|
||||
overflow: auto;
|
||||
scroll-behavior: smooth;
|
||||
scroll-padding: 2rem;
|
||||
}
|
||||
|
||||
& > .container {
|
||||
|
Reference in New Issue
Block a user