mailto: links ignore target="_blank"




8 years ago
8 days ago


(Reporter: wa84it, Unassigned)


17 Branch
Windows 7
Bug Flags:
firefox-backlog +
qe-verify ?

Firefox Tracking Flags

(Not tracked)



(2 attachments, 1 obsolete attachment)



8 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

A mailto: link with attribute target="_blank" opens in the current frame/window.

This is a problem as the current frame/window may not allow Javascript which some web mail handlers(at least Gmail) require.

As an example: the NewsFox extension has this problem with its mailto: of links from a frame where Javascript is not allowed, and can never be allowed according to editors.

Reproducible: Always

Comment 1

8 years ago
Posted file testcase


8 years ago
Version: unspecified → 4.0 Branch

Comment 2

8 years ago
I don't think that target="_blank" is the issue here, Firefox should regardless open a new tab on mailto: with mailto handler set to a webmail application in Options > Applications. You can bump up the version number as well, as this is still an issue in Fx7beta.

Comment 3

8 years ago
Turns out there is another issue here as well, as the page you click the mailto link on will be gone from back-forward history in the tab. Adding an example.


8 years ago
Attachment #556605 - Attachment mime type: text/plain → text/html

Comment 4

8 years ago
Comment on attachment 556605 [details]
mailto links should open in a new tab

<!DOCTYPE html>
	<meta charset="UTF-8">

<li>Open this page in a new tab to make sure that there is no back-forward history for this tab
<li>Set a webmail provider, eg. gmail, to handle mailto links in Options > Applications
<li>Click this <a href="">mailto link</a>

<p>Pass if gmail opens in a new tab</p>

<li>If gmail opens in current tab, which is a fail, go back in history to this page using the Back button
<li>click the mailto link above once again
<p>Pass if this page is in the back-forward history for this tab after last step</p>


8 years ago
Attachment #556605 - Attachment is obsolete: true


8 years ago
Attachment #556612 - Attachment mime type: text/plain → text/html

Comment 6

8 years ago
(In reply to heraldo from comment #3)
> Created attachment 556605 [details]
> mailto links should open in a new tab
> Turns out there is another issue here as well, as the page you click the
> mailto link on will be gone from back-forward history in the tab. Adding an
> example.

This is bug#499527.

Comment 7

8 years ago
Thanks R Pruitt, would you be so kind and delete comment nr. 4 for me? I messed up a bit, thought i could edit the attachment directly..


7 years ago
Ever confirmed: true


7 years ago
OS: Windows XP → Windows 7
Version: 4.0 Branch → 17 Branch
Is this issue expected to be resolved. It seems that target="_blank" should be respected particularly with mailto: links.

Comment 9

6 years ago
This is particularly bad with respect to user experience; most sites use a mailto: in order to allow the user to contact the webmaster. This bug will be seen a lot. One of a designer's goals is to keep the user on the site as long as possible (time is money); in the case of a 404 or another error where there's already a certain level of frustration for the user, this problem compounded by the inability to use history to go back to the site elevates that frustration and can cause visitors to abandon the site.

Hopefully this can be fixed in the near future.

Comment 10

5 years ago
Firefox 30.0 - I can't get it to respect *ANY* "_blank" links - let alone "mailto".
Same problem in FF 31 Mac. mailto link ignores target="_blank" and previous (page with the mailto) is missing from browser history when pressing back button.


5 years ago
Duplicate of this bug: 1054290
Flags: qe-verify?
Flags: firefox-backlog+
Points: --- → 8


4 years ago
Depends on: 1116478

Comment 13

4 years ago
Voting for a fix.

Comment 14

3 years ago
Voting for a fix too.

Comment 15

3 years ago
Voting for a fix although I think this is a significant issue. Especially after the user sends the email they remain on a blank Gmail page? This effectively kills the opportunity to engage the user any more on our sites.

Comment 16

3 years ago
This issue is nerly 5 years old. Opening the link in the same window kills the usage in web-apps.
I'm also voting for a fix. Please!

Comment 17

3 years ago

Comment 18

3 years ago
Please do something to fix this bug of _blank mailto links opening in _self tab !!

Comment 19

3 years ago
This is an especially bad bug since it kills history as well. Please fix.

Comment 20

3 years ago

I work on an interactive web app (chat, group annotations, etc).  We are trying to use mailto with target="_blank" to allow people to share an email link to their session, but obviously leaving the webapp to do so is horrible user experience!  I feel like this is a serious issue, and would love a fix.

Comment 21

2 years ago
+1 requesting attention.
Horrible that this bug has existed for 6 years+ and has not been handled. 

Whenever we offer a mailto: link to our visitors, we are making it horrible to click for FF users, of whom there are many in our target audience.
I can reproduce this in FF 56. It appears to be the same issue as, and although is supposedly about Prism, I wonder if it's the same bug as well.

Comment 23

a year ago

Comment 24

a year ago
Pretty please!

Comment 25

a year ago
Dudes, really...? I love Firefox btw

Comment 26

a year ago
Triage pls. Unless... Is there a reason why such feature appears abandoned in time?
Flags: needinfo?(mstriemer)

Comment 27

10 months ago
I would say that if this problem is still reproducible it should be fixed, maybe in the way suggested by bug 539562. At this time, however, we don't have a team working on the File Handling component, so it's unlikely to be fixed in the short term.
Flags: needinfo?(mstriemer)
Priority: -- → P3

Comment 28

8 days ago

until it is fixed one can use'mailto:....


data:text/html,<meta http-equiv='refresh' content='10;' />

(you can hate me later)

You need to log in before you can comment on or make changes to this bug.