ClipboardJS is now deprecated

When working with the <clipboard-button> component that uses ClipboardJS under the hood, the copy function has stopped working. Looking into it further, the library we use uses document.execCommand('copy'), which is now deprecated.

There’s a fix that doesn’t require a library using the Clipboard API. There are certain features that it doesn’t support but it seems to work for most of our purposes

Unfortunately, this won't work in the GDK when configured to run in the gdk.test domain, as it wouldn't be considered a Secure Context.

Locally-delivered resources such as those with http://127.0.0.1 URLs, http://localhost and http://*.localhost URLs (e.g. http://dev.whatever.localhost/), and file:// URLs are also considered to have been delivered securely.

A workaround would be to configure https locally

Edited by Jose Ivan Vargas