mampf
mampf copied to clipboard
Use new ClipboardAPI to replace outdated `document.execCommand()` calls
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.