-
Notifications
You must be signed in to change notification settings - Fork 376
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
replace clipboard with native browser support #7392
base: main
Are you sure you want to change the base?
Conversation
18bb888
to
c71bb92
Compare
@zoran995 - thanks for the improvement. One thing I realized when testing from our CI is that |
The main idea behind this was not to depend on deprecated APIs such as |
I sort of agree.. also it seems to work in |
c71bb92
to
b4a4da4
Compare
Hi @na9da, thank you for the suggestion. I have removed the copy button when the clipboard is unavailable, but would it be better to disable it instead of removing? |
What this PR does
Fixes #6774
Replace clipboard.js with native browser clipboard support. Browsers support native clipboard events for quite some time, while clipboard.js still uses old deprecated method, which might be removed at any point from browsers. There is no need for
Test me
Try copying the share URL in the app, it should properly copy the URL and show success for 3 seconds. I wanted to write unit tests for this, but we are using react-test-renderer, which is deprecated and does not offer convenient ways to test this. We need to see how to get the testing environment to a more modern stack.
Checklist
doc/
.