-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. |
Closing in favor of #3489 |
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.The text was updated successfully, but these errors were encountered: