vaadin / cookbook

Copy & paste recipes for Vaadin
https://cookbook.vaadin.com/
Apache License 2.0
20 stars 38 forks source link

Copy to clipboard recipe do not work in safari 17 #317

Open r-vanooyen opened 10 months ago

r-vanooyen commented 10 months ago

The recipe "copy to clipboard" do not work with the current safari version. I dont know, if that worked in previous versions of safari. The recipe was introduced with #76

Steps to reproduce bug:

open recipe https://cookbook.vaadin.com/copy-to-clipboard in Safari Browser Click on "Copy to clipboard" Button paste clipboard to some textarea -> this should show your old clipboard

You can not see an exception in the safari developer tools console.

expected behaviour paste clipboard to some textarea -> this should show the content of the textbox of that recipe page

samie commented 10 months ago

Looks like this uses execCommand which is deprecated. Should likely switch to https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API