Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
22bde795
Commit
22bde795
authored
Apr 17, 2023
by
Tomoaki Hayasaka
Browse files
Fix "Ctrl+Enter doesn't work when textarea has focus" regression introduced in #491.
parent
74fc7b77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
web/extensions/core/keybinds.js
web/extensions/core/keybinds.js
+6
-6
No files found.
web/extensions/core/keybinds.js
View file @
22bde795
...
@@ -5,12 +5,6 @@ app.registerExtension({
...
@@ -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({
...
@@ -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
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment