mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01: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 %}
|
||||
</div>
|
||||
{% 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" %}
|
||||
{% set languages = lang.t("search.language").split(",") %}
|
||||
{% if languages | length and languages[0] != "" %}
|
||||
|
@ -340,6 +340,11 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
if (!(query instanceof HTMLInputElement))
|
||||
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 */
|
||||
if (ev.metaKey || ev.ctrlKey)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user