mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 06:13:38 -04:00
Fixed content editable elements losing focus on control keys
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user