mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed content editable elements losing focus on control keys
This commit is contained in:
parent
9a16b9c6ea
commit
1aa8aeb252
File diff suppressed because one or more lines are too long
@ -190,7 +190,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/application.a1129ccd.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/application.51c3f73e.js' | url }}"></script>
|
||||||
{% if lang.t("search.language") != "en" %}
|
{% if lang.t("search.language") != "en" %}
|
||||||
{% set languages = lang.t("search.language").split(",") %}
|
{% set languages = lang.t("search.language").split(",") %}
|
||||||
{% if languages | length and languages[0] != "" %}
|
{% if languages | length and languages[0] != "" %}
|
||||||
|
@ -340,6 +340,11 @@ function initialize(config) { // eslint-disable-line func-style
|
|||||||
if (!(query instanceof HTMLInputElement))
|
if (!(query instanceof HTMLInputElement))
|
||||||
throw new ReferenceError
|
throw new ReferenceError
|
||||||
|
|
||||||
|
/* Skip editable elements */
|
||||||
|
if (document.activeElement instanceof HTMLElement &&
|
||||||
|
document.activeElement.contentEditable === "true")
|
||||||
|
return
|
||||||
|
|
||||||
/* Abort if meta key (macOS) or ctrl key (Windows) is pressed */
|
/* Abort if meta key (macOS) or ctrl key (Windows) is pressed */
|
||||||
if (ev.metaKey || ev.ctrlKey)
|
if (ev.metaKey || ev.ctrlKey)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user