Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): passing Promise into ClipboardItem to make it work in Safari #4634

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

parnas
Copy link
Contributor

@parnas parnas commented Sep 21, 2023

throwing Error in getBaseLayerBlob, instead of returning nil using copyBlobToClipboard for both Canvas and Text2Image clipboard functionality

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because: It's a simple bug

Description

Safari ClipboardItem functionality only works with unresolved Promises. Chrome (and Firefox with the ClipboardItem setting enabled) work with either.

QA Instructions, Screenshots, Recordings

Test copy to clipboard on both Canvas and Image2Text. Save to Gallery, Download Image and Send to ControlNet functionality on Canvas were also slightly affected.

Added/updated tests?

  • Yes
  • No : Are there FE tests?

throwing Error in getBaseLayerBlob, instead of returning nil
using copyBlobToClipboard for both Canvas and Text2Image clipboard functionality
@psychedelicious
Copy link
Collaborator

Thanks!

No FE tests, sorry - closest thing is to run yarn lint (or the gh action will run for you).

@psychedelicious psychedelicious enabled auto-merge (rebase) September 21, 2023 13:33
@psychedelicious psychedelicious merged commit aa82f93 into invoke-ai:main Sep 21, 2023
8 checks passed
@Millu
Copy link
Contributor

Millu commented Sep 21, 2023

Thanks for fixing this @parnas!

If you're interested in continuing to contribute to InvokeAI's frontend, we could use all the help we can get! Are you in the Discord by any chance? We'd love to have you join us in the #dev-chat channel if so!

@parnas parnas deleted the fix/ui/safari-clipboard branch September 21, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants