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
9562a6b4
Commit
9562a6b4
authored
Sep 10, 2023
by
comfyanonymous
Browse files
Fix a few clipboard issues.
parent
d4b2bc09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
web/scripts/app.js
web/scripts/app.js
+6
-19
No files found.
web/scripts/app.js
View file @
9562a6b4
...
@@ -742,7 +742,7 @@ export class ComfyApp {
...
@@ -742,7 +742,7 @@ export class ComfyApp {
// copy nodes and clear clipboard
// copy nodes and clear clipboard
if
(
this
.
canvas
.
selected_nodes
)
{
if
(
this
.
canvas
.
selected_nodes
)
{
this
.
canvas
.
copyToClipboard
();
this
.
canvas
.
copyToClipboard
();
e
.
clipboardData
.
clearData
();
e
.
clipboardData
.
setData
(
'
text
'
,
'
'
);
//clearData doesn't remove images from clipboard
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
e
.
stopImmediatePropagation
();
return
false
;
return
false
;
...
@@ -848,29 +848,16 @@ export class ComfyApp {
...
@@ -848,29 +848,16 @@ export class ComfyApp {
// Ctrl+C Copy
// Ctrl+C Copy
if
((
e
.
key
===
'
c
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
if
((
e
.
key
===
'
c
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
if
(
e
.
shiftKey
)
{
this
.
copyToClipboard
(
true
);
e
.
clipboardData
.
clearData
();
block_default
=
true
;
}
else
{
// Trigger onCopy
// Trigger onCopy
return
true
;
return
true
;
}
}
}
// Ctrl+V Paste
// Ctrl+V Paste
if
((
e
.
key
===
'
v
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
if
((
e
.
key
===
'
v
'
||
e
.
key
==
'
V
'
)
&&
(
e
.
metaKey
||
e
.
ctrlKey
))
{
if
(
e
.
shiftKey
)
{
this
.
pasteFromClipboard
(
true
);
block_default
=
true
;
}
else
{
// Trigger onPaste
// Trigger onPaste
return
true
;
return
true
;
}
}
}
}
}
this
.
graph
.
change
();
this
.
graph
.
change
();
...
...
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