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

Update use-clipboard.ts/Copying error on some devices #4449

Closed
wants to merge 2 commits into from

Conversation

vadimkiryanov
Copy link
Contributor

On some devices it is not possible to copy the value with navigator.clipboard.writeText(), for example on Apple devices. Sometimes it is not possible to copy a value while working in coding sandboxes.

I propose a solution that increases the probability that the value will be copied. To do this, I've added double error handling, just in case navigator.clipboard.writeText() fails, then the code will automatically run the second option to copy the value.

On some devices it is not possible to copy the value with navigator.clipboard.writeText(), for example on Apple devices. Sometimes it is not possible to copy a value while working in coding sandboxes.

I propose a solution that increases the probability that the value will be copied. To do this, I've added double error handling, just in case navigator.clipboard.writeText() fails, then the code will automatically run the second option to copy the value.
On some devices it is not possible to copy the value with navigator.clipboard.writeText(), for example on Apple devices. Sometimes it is not possible to copy a value while working in coding sandboxes.

I propose a solution that increases the probability that the value will be copied. To do this, I've added double error handling, just in case navigator.clipboard.writeText() fails, then the code will automatically run the second option to copy the value.
@vadimkiryanov vadimkiryanov deleted the patch-2 branch June 22, 2023 12:00
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.

1 participant