I have a mailto link on a page. It works as expected when the page is loaded by itself.
However when the page is loaded via a frameset in Chrome nothing happens. Wit
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:a@b.c">email1</a>
<a target="_top" href="mailto:a@b.c">email2</a>
Possibly because your parent frameset is https, but Chrome now seems to treat the mailto link as insecure.
I just came across a similar issue when triggering a mailto link via
window.location = 'mailto:...'
Changing it to this worked around it.
window.open( 'mailto:...')
This is my workaround until Chrome bug is fixed:
$.browser.chrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase());
if($.browser.chrome){
myWindow=window.open("mailto:"+eml+"?subject="+msb,'','width=50,height=50');
myWindow.close();
} else {
window.location.href = "mailto:"+eml+"?subject="+msb;
}
For Chrome, make instance with window.open() method and close that instance immediately. Small window will "blink" for a short period but will do the job. It is "dirty" solution but as much as Chrome's bug.
For other browsers window.location() method can be used.
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:...';
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;
});