Skip to content

fix: add copy fallback for insecure contexts #2044

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

Merged
merged 3 commits into from
Jun 23, 2022
Merged

Conversation

oxy
Copy link
Contributor

@oxy oxy commented Jun 3, 2022

This PR adds a clipboard copy fallback for insecure contexts.

Subtasks

  • added fallback

Fixes #1601

@oxy oxy requested a review from a team as a code owner June 3, 2022 19:22
Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏻

@greyscaled
Copy link
Contributor

I'm wondering if @mafredri can help us test :D

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this out and it doesn't seem to do anything on any of my browsers (Safari, Firefox, Brave). It also doesn't log anything in the console which would indicate result === true.

Perhaps input.hidden = true can't be selected? What if we use CSS to hide it instead?

PS. Thanks for taking a stab at fixing this @oxy!

@oxy oxy force-pushed the oxy/clipboard-fallback branch 2 times, most recently from 8b26144 to 58cd3ed Compare June 22, 2022 22:09
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works now, awesome! 😎

@oxy oxy force-pushed the oxy/clipboard-fallback branch from 58cd3ed to b577731 Compare June 23, 2022 18:24
@oxy oxy force-pushed the oxy/clipboard-fallback branch from d1c8346 to 2ee9f80 Compare June 23, 2022 19:55
@oxy oxy merged commit 981fb27 into main Jun 23, 2022
@oxy oxy deleted the oxy/clipboard-fallback branch June 23, 2022 20:35
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.

Copy to clipboard button in /cli-auth doesn't work when running on non-local (rPi) machine over HTTP
3 participants