cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Copy to clipboard recipe do not work in safari 17

Open r-vanooyen opened this issue 2 years ago • 1 comments

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

r-vanooyen avatar Jan 18 '24 11:01 r-vanooyen

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

samie avatar Jan 18 '24 12:01 samie