InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: clipboard copy not working in unified canvas

Open exeea opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

10GB

What happened?

pressing CTRL+C in the Unified Canvas results in this error in the console and nothing is saved in the clipboard even if the "Image Copied" notification appears:

index.d864890e.js:618
Uncaught TypeError: Cannot read properties of undefined (reading 'write') at index.d864890e.js:618:30194

that is:

i.toBlob(a=>{a && navigator.clipboard.write([new ClipboardItem({ [a.type]: a })]) }

Screenshots

Untitled-2

Additional context

No response

Contact Details

No response

exeea avatar Dec 12 '22 19:12 exeea

The issue happens because on http, for security reasons, there is no navigator.clipboard object. Instead of a console error, would be better a graceful message, maybe even a window.isSecureContext check.

exeea avatar Dec 17 '22 18:12 exeea

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 14 '23 06:03 github-actions[bot]