Copy to clipboard is not working in safari.

var parsedText = Pointer_stringify(text);
var textArea = document.createElement(“textarea”); = 'fixed'; = 0; = 0; = '10em'; = '10em'; = 0; = 'none'; = 'none'; = 'none'; = 'transparent';

  textArea.value = parsedText;
  try {
    var successful = document.execCommand('copy');
    var msg = successful ? 'successful' : 'unsuccessful';
    console.log('Copying text command was ' + msg);
  } catch (err) {
    console.log('Oops, unable to copy');


This code is working fine in Chrome and Firefox. Only in safari “document.execCommand(‘copy’)” method always return false and content also not copy to clipboard.

Using Unity 2021.1.5f1.

1 Like

You know this problem you should report it to Apple although I doubt they will give you an answer so they will deny everything,
so better leave your code without safari; Chrome and Firefox are fine, they are the most used.

always remember “the truth is out there”