I tested it, the copy button worked fine on Firefox and the itch app. But on Chrome it returned the error you mentioned.
I have a web app that also have a copy button, and it behaves the same way. But I do have fallback/workaround for this case, though not very elegant: which is just showing the text to be copied in a container, and then tell the user to manually ctrl + C
it, if the copy button doesn’t works.
I found this hacky workaround, but haven’t tested it myself: https://stackoverflow.com/a/72239825
It involves creating <textarea>
element, putting the text there, focusing and selecting its content, and then use document.execCommand('copy');
to copy it.
But it seems like Document.execCommand has already been deprecated.
The emojis generated on your app can still be selected and copied manually on Chrome though. Which I think is good enough.