Fix "Ctrl+Enter doesn't work when textarea has focus" regression introduced in #491.
This commit is contained in:
parent
74fc7b7726
commit
22bde7957e
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue