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

Use new ClipboardAPI to replace outdated document.execCommand() calls #684

Open
Splines opened this issue Aug 21, 2024 · 0 comments
Open
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@Splines
Copy link
Member

Splines commented Aug 21, 2024

Currently, we use the clipboard-rails gem as wrapper for the clipboard.js library. It uses a fakeCopyAction to copy to the clipboard via document.execCommand(), which is deprecated. We use the library in our app/assets/javascripts/copy_and_paste_button.js file introduced in #670 (previously only here).

Instead, we should use the new Clipboard API that modern browsers support. This would also have the advantage that the infrastructure to test clipboard content in Cypress, introduced via 7429387 (see the TODO notes there) in pull request #670, would work.

@Splines Splines added the dependencies Pull requests that update a dependency file label Aug 21, 2024
@Splines Splines self-assigned this Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant