Fix "Ctrl+Enter doesn't work when textarea has focus" regression introduced in #491.

This commit is contained in:
Tomoaki Hayasaka 2023-04-17 01:58:33 +09:00
parent 74fc7b7726
commit 22bde7957e
1 changed files with 6 additions and 6 deletions

View File

@ -5,12 +5,6 @@ app.registerExtension({
name: id,
init() {
const keybindListener = function(event) {
const target = event.composedPath()[0];
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
return;
}
const modifierPressed = event.ctrlKey || event.metaKey;
// Queue prompt using ctrl or command + enter
@ -19,6 +13,12 @@ app.registerExtension({
return;
}
const target = event.composedPath()[0];
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
return;
}
const modifierKeyIdMap = {
"s": "#comfy-save-button",
83: "#comfy-save-button",