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
df49a727
"vscode:/vscode.git/clone" did not exist on "df79294cbaac58bf425f2b5c42d9ff9e46a21e1b"
Commit
df49a727
authored
Jan 13, 2024
by
pythongosssss
Browse files
Fix modifiers triggering key down checks
parent
56d9496b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
web/extensions/core/undoRedo.js
web/extensions/core/undoRedo.js
+11
-0
No files found.
web/extensions/core/undoRedo.js
View file @
df49a727
...
...
@@ -106,6 +106,7 @@ const bindInput = (activeEl) => {
}
};
let
keyIgnored
=
false
;
window
.
addEventListener
(
"
keydown
"
,
(
e
)
=>
{
...
...
@@ -116,6 +117,9 @@ window.addEventListener(
return
;
}
keyIgnored
=
e
.
key
===
"
Control
"
||
e
.
key
===
"
Shift
"
||
e
.
key
===
"
Alt
"
||
e
.
key
===
"
Meta
"
;
if
(
keyIgnored
)
return
;
// Check if this is a ctrl+z ctrl+y
if
(
await
undoRedo
(
e
))
return
;
...
...
@@ -127,6 +131,13 @@ window.addEventListener(
true
);
window
.
addEventListener
(
"
keyup
"
,
(
e
)
=>
{
if
(
keyIgnored
)
{
keyIgnored
=
false
;
checkState
();
}
});
// Handle clicking DOM elements (e.g. widgets)
window
.
addEventListener
(
"
mouseup
"
,
()
=>
{
checkState
();
...
...
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