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

Safari when copy is made async #109

Open
tonypee opened this issue Dec 3, 2020 · 1 comment
Open

Safari when copy is made async #109

tonypee opened this issue Dec 3, 2020 · 1 comment

Comments

@tonypee
Copy link

tonypee commented Dec 3, 2020

It seems that the click handler cannot load data? or do other pre-processing?

Example:

https://codesandbox.io/s/ecstatic-chaplygin-enmpd?file=/src/App.js

@tonypee tonypee changed the title Safari fails when the copy is made after an async wait Safari when copy is made async Dec 3, 2020
@sudodoki
Copy link
Owner

sudodoki commented Dec 3, 2020

it might be that it relies on sync handler and want execCommand to be invoked immediately after user interaction due to security policy. Wonder whether it's going to be the same with synchronous XMLHTTPrequest https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests#Synchronous_request althought it might be deprecated in main thread. Possibly could try to prefetch items / split into two steps (click -> loader -> ready, click here to copy), but it might be too much trouble and not applicable for every case

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

No branches or pull requests

2 participants