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

"Copy as k8s" doesn't work in Safari #1967

Closed
johncowen opened this issue Jan 8, 2024 · 4 comments
Closed

"Copy as k8s" doesn't work in Safari #1967

johncowen opened this issue Jan 8, 2024 · 4 comments
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Milestone

Comments

@johncowen
Copy link
Contributor

What happened?

I noticed during working on #1873 that using the "Copy as k8s" copy functionality doesn't work in Safari.


Separately, I looked a little deeper into it an it looks to be due to the browser security features that don't let you perform copy actions without a user interaction.

In this instance, when the user clicks the button, we perform a HTTP request before using the response of that to write to the users clipboard, hence the write is not really a result of a user interaction, but more a successful HTTP response.

When I briefly read into it, it seems like the "user interaction" is bounded by a time period. Following that I could reliably get the copying to work by using a short setTimeout, but as soon as I took the timeout past ~999 the copying reliably stopped working, producing a browser error (which we currently swallow). Other browsers seem to be more lenient on this. Although the assumptions I've written here could be entirely wrong.

@johncowen johncowen added triage/pending This issue will be looked at on the next triage meeting kind/bug A bug labels Jan 8, 2024
@jakubdyszkiewicz jakubdyszkiewicz added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Jan 8, 2024
@lahabana lahabana modified the milestones: 2.6.x, 2.7.x Jan 9, 2024
@johncowen johncowen assigned johncowen and unassigned johncowen Jan 29, 2024
@lahabana lahabana modified the milestones: 2.7.x, backlog Feb 14, 2024
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label May 15, 2024
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@johncowen johncowen removed the triage/stale Inactive for some time. It will be triaged again label May 15, 2024
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Aug 14, 2024
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@lukidzi lukidzi removed the triage/stale Inactive for some time. It will be triaged again label Aug 19, 2024
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Nov 18, 2024
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@lukidzi lukidzi removed the triage/stale Inactive for some time. It will be triaged again label Nov 18, 2024
@lahabana
Copy link
Contributor

Closing in favor of #3489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

4 participants