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

bug(frontend): copy to clipboard doesn't work on firefox (within a secure context) #285

Open
abelanger5 opened this issue Mar 22, 2024 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@abelanger5
Copy link
Contributor

Error message:

image

We are directly using navigator.clipboard in copy-to-clipboard.tsx, this should be a very easy switch to something like clipboardjs.

@abelanger5 abelanger5 added bug Something isn't working good first issue Good for newcomers labels Mar 22, 2024
@yashsinghcodes
Copy link

yashsinghcodes commented Mar 23, 2024

Hi @abelanger5 - Can you guide me how can I reproduce this error on firefox? As I used the Copy to clipboard button in API Token and it seems to be working for me.

@grahhnt
Copy link

grahhnt commented Mar 23, 2024

I filed this on the project's Discord here and it just clicked that the clipboard API is privileged and when I got this error I was accessing via http

Maybe show like an error message or hide the button or something when running on an insecure context?

@abelanger5 abelanger5 changed the title bug(frontend): copy to clipboard doesn't work on firefox bug(frontend): copy to clipboard doesn't work on firefox (within a secure context) Mar 25, 2024
@yashsinghcodes
Copy link

Ah I see, I think hiding the button would be better as error message can lead to bad UI/UX.

I know this is out of scope now but clipboardjs relies on execCommand API which is now deprecated.

@badex-ai badex-ai mentioned this issue Mar 26, 2024
2 tasks
shiv4nk4r added a commit to shiv4nk4r/hatchet that referenced this issue Jul 2, 2024
@shiv4nk4r shiv4nk4r mentioned this issue Jul 2, 2024
2 tasks
@shiv4nk4r
Copy link

@abelanger5 Please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants