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 %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ 'assets/javascripts/custom.054acff4.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/custom.526c59dc.min.js' | url }}"></script>
|
||||||
{% endblock %}
|
{% 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,
|
"base": base_url,
|
||||||
"features": features,
|
"features": features,
|
||||||
"translations": {},
|
"translations": {},
|
||||||
"search": "assets/javascripts/workers/search.c011b7c0.min.js" | url
|
"search": "assets/javascripts/workers/search.b8dbb3d2.min.js" | url
|
||||||
} -%}
|
} -%}
|
||||||
{%- if config.extra.version -%}
|
{%- if config.extra.version -%}
|
||||||
{%- set mike = config.plugins.get("mike") -%}
|
{%- set mike = config.plugins.get("mike") -%}
|
||||||
@ -249,7 +249,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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 %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -114,7 +114,9 @@ export function getOptionalElement<T extends HTMLElement>(
|
|||||||
* @returns Element or nothing
|
* @returns Element or nothing
|
||||||
*/
|
*/
|
||||||
export function getActiveElement(): HTMLElement | undefined {
|
export function getActiveElement(): HTMLElement | undefined {
|
||||||
return document.activeElement instanceof HTMLElement
|
return (
|
||||||
? document.activeElement || undefined
|
document.activeElement?.shadowRoot?.activeElement as HTMLElement ??
|
||||||
: undefined
|
document.activeElement as HTMLElement ??
|
||||||
|
undefined
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user