mailto link not working within a frame chrome (over https)

Here is the solution I ended up with: Tested with Chrome, Firefox, IE6, IE7, IE8, IE9, IE10, IE11, Safari

$("a[href^='mailto:']").on("click",function() {
    window.top.location = $(this).prop("href");
    return false;
});

Yes, using "top" is the trick, but you can do it with HTML alone!

<a target="_top" href="mailto:...">email</a>

add target="_top" or "_blank" or "_parent"

<a target="_top" href="mailto:[email protected]">email1</a>

<a target="_top" href="mailto:[email protected]">email2</a>


I also had this issue recently with an iframe. Using the top frame worked and should be compatible with all major browsers.

window.top.location = 'mailto:...';