mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
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,
|
name: id,
|
||||||
init() {
|
init() {
|
||||||
const keybindListener = function(event) {
|
const keybindListener = function(event) {
|
||||||
const target = event.composedPath()[0];
|
|
||||||
|
|
||||||
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const modifierPressed = event.ctrlKey || event.metaKey;
|
const modifierPressed = event.ctrlKey || event.metaKey;
|
||||||
|
|
||||||
// Queue prompt using ctrl or command + enter
|
// Queue prompt using ctrl or command + enter
|
||||||
@ -19,6 +13,12 @@ app.registerExtension({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const target = event.composedPath()[0];
|
||||||
|
|
||||||
|
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const modifierKeyIdMap = {
|
const modifierKeyIdMap = {
|
||||||
"s": "#comfy-save-button",
|
"s": "#comfy-save-button",
|
||||||
83: "#comfy-save-button",
|
83: "#comfy-save-button",
|
||||||
|
Loading…
Reference in New Issue
Block a user