mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed invisible back-to-top button being focusable
This commit is contained in:
parent
3c352bd356
commit
60a007844c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -223,7 +223,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.527e4d51.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.48dfec6c.min.js' | url }}"></script>
|
||||||
{% for path in config["extra_javascript"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -40,8 +40,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
resetBackToTopOffset,
|
resetBackToTopOffset,
|
||||||
resetBackToTopState,
|
resetBackToTopState,
|
||||||
|
resetFocusable,
|
||||||
setBackToTopOffset,
|
setBackToTopOffset,
|
||||||
setBackToTopState
|
setBackToTopState,
|
||||||
|
setFocusable
|
||||||
} from "~/actions"
|
} from "~/actions"
|
||||||
import { Viewport, setElementFocus } from "~/browser"
|
import { Viewport, setElementFocus } from "~/browser"
|
||||||
|
|
||||||
@ -156,8 +158,10 @@ export function mountBackToTop(
|
|||||||
if (hidden) {
|
if (hidden) {
|
||||||
setBackToTopState(el, "hidden")
|
setBackToTopState(el, "hidden")
|
||||||
setElementFocus(el, false)
|
setElementFocus(el, false)
|
||||||
|
setFocusable(el, -1)
|
||||||
} else {
|
} else {
|
||||||
resetBackToTopState(el)
|
resetBackToTopState(el)
|
||||||
|
resetFocusable(el)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -165,6 +169,7 @@ export function mountBackToTop(
|
|||||||
complete() {
|
complete() {
|
||||||
resetBackToTopOffset(el)
|
resetBackToTopOffset(el)
|
||||||
resetBackToTopState(el)
|
resetBackToTopState(el)
|
||||||
|
resetFocusable(el)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user