mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed capturing of keyboard events for custom elements
Co-authored-by: vtsvetkov-splunk <142901247+vtsvetkov-splunk@users.noreply.github.com>
This commit is contained in:
parent
6128ab92f2
commit
be95f4901a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -23,5 +23,5 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ 'assets/javascripts/custom.054acff4.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/custom.526c59dc.min.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -218,7 +218,7 @@
|
||||
"base": base_url,
|
||||
"features": features,
|
||||
"translations": {},
|
||||
"search": "assets/javascripts/workers/search.c011b7c0.min.js" | url
|
||||
"search": "assets/javascripts/workers/search.b8dbb3d2.min.js" | url
|
||||
} -%}
|
||||
{%- if config.extra.version -%}
|
||||
{%- set mike = config.plugins.get("mike") -%}
|
||||
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.7f914c06.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.a963951d.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -114,7 +114,9 @@ export function getOptionalElement<T extends HTMLElement>(
|
||||
* @returns Element or nothing
|
||||
*/
|
||||
export function getActiveElement(): HTMLElement | undefined {
|
||||
return document.activeElement instanceof HTMLElement
|
||||
? document.activeElement || undefined
|
||||
: undefined
|
||||
return (
|
||||
document.activeElement?.shadowRoot?.activeElement as HTMLElement ??
|
||||
document.activeElement as HTMLElement ??
|
||||
undefined
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user