Not allowed to launch 'mailto:' because a user gesture is required

Viewed 1325

I am creating a chrome extension wherein I'd like to email the result.

So this is the UI from Chrome Extension Popup. enter image description here

Then this is the a for that:

enter image description here

So basically, the code is

<a href={`mailto:{email}`}>email</a>

It will open my email app at first click, enter image description here

but the second click to email will produce this error: enter image description here

What seems to be the problem here? Thank you for your answer.

1 Answers

I think the problem is caused by clicking again while the mail is open.

So, if you doesn't matter extenstion closing when the link is clicked, Try this

 <a target="_blank" rel="nofollow" href={`mailto:{email}`}>mail</a>
Related