When a user has refused a clipboard access prompt, the message is not showing while next copy attempts, until the page will be reloaded. Is there a way to call the prompt manually without the page reload?
I am using React with copy-to-clipboard 3.3.1 npm package. According to the Niet the Dark Absol's advice, my copy function looks like
copyToClipboard(phone: string) {
copy(phone, {
format: 'text/plain',
onCopy: (clipboardData: DataTransfer) => {
const copiedPhone = clipboardData.getData('text/plain');
if (copiedPhone === phone) {
this.setState({showMessage: true});
}
}
});
}
Means that I show 'Success' message when text was copied