mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 13:53:43 -04:00
Improved back-to-top button during fast scrolling
This commit is contained in:
@@ -139,7 +139,7 @@ export function mountBackToTop(
|
||||
|
||||
/* Handle emission */
|
||||
next({ hidden }) {
|
||||
el.classList.toggle("md-top--hidden", hidden)
|
||||
el.hidden = hidden
|
||||
if (hidden) {
|
||||
el.setAttribute("tabindex", "-1")
|
||||
el.blur()
|
||||
@@ -151,7 +151,7 @@ export function mountBackToTop(
|
||||
/* Handle complete */
|
||||
complete() {
|
||||
el.style.top = ""
|
||||
el.classList.add("md-top--hidden")
|
||||
el.hidden = true
|
||||
el.removeAttribute("tabindex")
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user