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
d4b2bc09
Commit
d4b2bc09
authored
Sep 10, 2023
by
comfyanonymous
Browse files
Merge branch 'master' of
https://github.com/miabrahams/ComfyUI
parents
122fd5d3
264867bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
web/scripts/app.js
web/scripts/app.js
+16
-5
No files found.
web/scripts/app.js
View file @
d4b2bc09
...
...
@@ -735,9 +735,17 @@ export class ComfyApp {
*/
#
addCopyHandler
()
{
document
.
addEventListener
(
"
copy
"
,
(
e
)
=>
{
// copy
if
(
e
.
target
.
type
===
"
text
"
||
e
.
target
.
type
===
"
textarea
"
)
{
// Default system copy
return
;
}
// copy nodes and clear clipboard
if
(
this
.
canvas
.
selected_nodes
)
{
this
.
canvas
.
copyToClipboard
();
e
.
clipboardData
.
clearData
();
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
return
false
;
}
});
}
...
...
@@ -842,11 +850,14 @@ export class ComfyApp {
if
((
e
.
key
===
'
c
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
if
(
e
.
shiftKey
)
{
this
.
copyToClipboard
(
true
);
e
.
clipboardData
.
clearData
();
block_default
=
true
;
}
// Trigger default onCopy
else
{
// Trigger onCopy
return
true
;
}
}
// Ctrl+V Paste
if
((
e
.
key
===
'
v
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
...
...
@@ -855,7 +866,7 @@ export class ComfyApp {
block_default
=
true
;
}
else
{
// Trigger
default
onPaste
// Trigger onPaste
return
true
;
}
}
...
...
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