CopytoClipborad, Iphone pop-up

Hey guys!

I have a question - I added a code to my client’s website (Classic Editor) copyToClipboard()

On desktop and Android it works fine, but on iOS the window in the attached image appears.

How can I make sure it doesn’t pop up?

The is the code:

import wixWindow from 'wix-window';

let copyToClipboard;


$w.onReady(function () {
 $w("#text52").onClick((event) => {
 let text = $w('#text52').text;
  wixWindow.copyToClipboard(text)
   .then(() => {
    $w('#vectorImage2').show();
   })
   .catch((err) => {
    console.log(err)
   });
 })});

This is currently a browser behavior and not something explicit to Wix as referenced in the docs.

I believe other sites are using workarounds to achieve this, although I don’t have personal experience trying any other methods. It might be possible with Custom Elements, but can’t comment on it 100%

1 Like