A
A
Anton052020-11-01 16:37:15
JavaScript
Anton05, 2020-11-01 16:37:15

Can a user copy a link to clipboard in mobile safari?

There is a link to another page. I want the link to be copied to the user's clipboard when the button is clicked. It works in Safari on a Macbook, but not on an iPhone. I use execCommand("copy"). And most importantly, when I call alert(document.queryCommandSupported it comes out true.
Thank you so much!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Morgachev, 2020-11-02
@GrinMorg

I suggest connecting some JS plugin, for example this one https://clipboardjs.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question