mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-02 10:48:49 -04:00
Fixed invisible back-to-top button being focusable
This commit is contained in:
@@ -40,8 +40,10 @@ import {
|
||||
import {
|
||||
resetBackToTopOffset,
|
||||
resetBackToTopState,
|
||||
resetFocusable,
|
||||
setBackToTopOffset,
|
||||
setBackToTopState
|
||||
setBackToTopState,
|
||||
setFocusable
|
||||
} from "~/actions"
|
||||
import { Viewport, setElementFocus } from "~/browser"
|
||||
|
||||
@@ -156,8 +158,10 @@ export function mountBackToTop(
|
||||
if (hidden) {
|
||||
setBackToTopState(el, "hidden")
|
||||
setElementFocus(el, false)
|
||||
setFocusable(el, -1)
|
||||
} else {
|
||||
resetBackToTopState(el)
|
||||
resetFocusable(el)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -165,6 +169,7 @@ export function mountBackToTop(
|
||||
complete() {
|
||||
resetBackToTopOffset(el)
|
||||
resetBackToTopState(el)
|
||||
resetFocusable(el)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user