nuxt-protected-mailto icon indicating copy to clipboard operation
nuxt-protected-mailto copied to clipboard

Add target blank (open in new page) option

Open toddpadwick opened this issue 2 years ago • 4 comments

Hey! I wonder if could point me in the direction to make the email page open in a new tab? (equivelent of target="_blank" on a normal mailto link)

toddpadwick avatar Aug 03 '21 13:08 toddpadwick

I can't see the reason why you want to do this? Can you explain? Actually this won't work with the current solution. Maybe I can help, when I understand the case.

mmoollllee avatar Aug 03 '21 14:08 mmoollllee

Okay I see why. Please see this thread on SO why this does not really make sense for everybody. Also the current (in my opinion most secure) way to hide the mailadress for bots, won't work with target="_blank" as I use window.location. Using window.open would be blocked in most browsers I guess.

mmoollllee avatar Aug 03 '21 14:08 mmoollllee

Hey @mmoollllee... thanks for the speedy response :)

we have a campaign website where the user gets a list of recommended practitioners for healthcare treatments. When you click on each practitioners email, if your email client is a browser based one like Gmail, it currently changes the page to go to gmail and they lose the list of practitioners and are taken away from the campaign site altogether. Whereas the client wants the email screen to open in a window so that the user is more likely to return to the site after sending the email (and potentially making more transactions in doing so). The user may also wish to email multiple practitioners rather than just one. Normal mailto links do allow a target="_blank" fields.

toddpadwick avatar Aug 03 '21 15:08 toddpadwick

I tried to implement it for you in the latest release. Using target="_blank" on the Mailto component will use window.open instead. Can you try if this works for you?

mmoollllee avatar Nov 01 '21 15:11 mmoollllee