Fix hotkey event handling for non-input elements

This commit is contained in:
Harvey Zack committed 2023-11-27 10:00:10 +08:00
1 parent 144ab64421
commit 52be176830
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -4155,7 +4155,7 @@ class Hotkey {
if (this.art.isFocus) {
const tag = document.activeElement.tagName.toUpperCase();
const editable = document.activeElement.getAttribute("contenteditable");
if (tag !== "INPUT" && tag !== "TEXTAREA" && editable !== "" && editable !== "true") {
if (tag !== "INPUT" && tag !== "TEXTAREA" && editable !== "" && editable !== "true" && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
const events = this.keys[event.keyCode];
if (events) {
event.preventDefault();