I've already updated my google chrome browser from its latest version. Talking about https, its already https protocol since its from hubspot contacts.
How may i know if the site has permissions to acces the clipboard ?
Hi there, This can happen if the Clipboard API is not supported in the environment or if there are some security restrictions. I would suggest verifying the following:
Ensure that the Clipboard API is supported in the browser you're using. Perhaps add a simple check before calling the writeText method.
I believe the Clipboard API only works in secure contexts (HTTPS). Make sure your application is served over HTTPS.
Ensure that the site has permissions to access the clipboard.
I would also add some additional validation to your code, something like:
const copyToClipBoard = async (copyType, copyText) => {
if (!navigator.clipboard) {
sendAlert({
message: `Clipboard API is not supported in your browser.`,
variant: "error",
});
return;
}