Closed Bug 421310 Opened 17 years ago Closed 2 years ago

clicking news:/nntp:/mailto: link with target="_blank" or "foobar" in html mail (also) loads a blank tab

Categories

(Thunderbird :: Mail Window Front End, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dwolfenden, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Build Identifier: 2.0.0.12 (.......0213) Response (AnneT) 03/05/2008 07:31 PM Hello David, This is actually a problem with Thunderbird that needs to be addressed by your IT team. Essentially it's a program string inside the firefox browser that needs to be changed from: network.protocol-handler.app.mailto To: /usr/bin/thunderbird --------------------------- This is a complicated subject though and a mistake could ruin your browser. I hope this helps! If you have further questions, then please don't hesitate to get back to me. Thanks for using Constant Contact! Customer (David Wolfenden) 03/05/2008 05:46 PM Bingo! That solved the problem in a flash.Now a new issue. I have added an email link. However, all of my machines use Thunderbird for an email client as I am sure many other people do. It has become quite popular for a number of good reasons. On the email I can move over the link and it appears lower left corner as it should. But it does not bring up T-Bird so a reply can be sent. It just sits there. It works fine with machines using Outlook Express. Take a look at today's updated file and try it. Thanks for your very good help. DW Reproducible: Always Steps to Reproduce: 1.View email produced by Constant Contact 2.Click on the return email link 3.Sit and wait forever Actual Results: nothing Expected Results: Clicking on the link should have opened the t-bird send email window with the TO: line filled in.
Reset firefox as you default browser. Problem resolved? (If so, resolve this bug as invalid or worksforme.) BTW, Thunderbird support forums are here: <http://forums.mozillazine.org/viewforum.php?f=39>
This did not resolve the problem nor did running the following firefox.exe -silent -setDefaultBrowser from the RUN command.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
wontfix is probably not what you want. https://bugzilla.mozilla.org/page.cgi?id=fields.html#resolution You might have to set some other browser as default first, then firefox again. (And setting network.protocol-handler.app.mailto shouldn't be needed, esp. if you're on windows, /usr/bin/thunderbird as you said is definitely wrong.)
Resolution: WONTFIX → INVALID
Switched default browser to IE7. Browsed a bit. Switched back to FF. Same problem.
Oh, realized I read that the wrong way, it's a *mail* link you want to open, not a web link in a mail. In that, case try resetting thunderbird as default mail client. And remove the network.protocol-handler.app.mailto esp. if it's wrong.
It still does not work. And even if it did the fix would only apply to my situation.....not the thousands of other T-Bird users. Basically what this means is that anyone doing email marketing as I am and who inserts a call to the email client for a reply, will not be hearing from anyone running Thunderbird. That bothers me.
Exactly what link isn't working for you? In general, it works for most people.
I have tried to email the piece to you with no success.
The link is the embedded "mail to" html link.
An example could help... does the one in URL work for you?
Unfortunately, I cannot send you an .eml file. I tried. and, yes, I can link to URL. It just does not bring the T-Bird "write" page up with the addressee to enter a message. As I said before, this DOES function with Outlook/Outlook Express on PCs that are using FireFox as the browser. It's just when T-Bird is used as the email client.
You can attach it to this bug. (And I meant does clicking the URL: field of this bug report work for you.)
Examined a mail I got from reporter, this turns out to be due to the mailto link having a target attribute. Confirming on trunk.
Status: RESOLVED → UNCONFIRMED
OS: Windows XP → All
Hardware: PC → All
Resolution: INVALID → ---
Summary: email will not open from Constant Contact mailto link. See below. → clicking mailto: link with target="_blank" gives no result
Status: UNCONFIRMED → NEW
Ever confirmed: true
User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729) Thunderbird User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.22) Gecko/20090605 Lightning/0.9 Thunderbird/2.0.0.22 For me, a mailto link with a target attribute on a webpage works fine. Clicking that link in Firefox opens up Thunderbird correctly. Clicking the same link within an email in Outlook also opens up Thunderbird correctly. However, that same link - when its within an email in Thunderbird - does not work. No action takes place on clicking the link. Kind of ironic...
Summary: clicking mailto: link with target="_blank" gives no result → clicking news:/nntp:mailto: link with target="_blank" or "_top" gives no result
Summary: clicking news:/nntp:mailto: link with target="_blank" or "_top" gives no result → clicking news:/nntp:/mailto: link with target="_blank" or "_top" gives no result
Attached patch proposed fix (obsolete) — Splinter Review
This works, but it's a bit ugly. Anyone got better ideas?
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Update: target="" works correctly. target="anythingelse" does not work. (In reply to comment #14) > User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) > Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729) > > Thunderbird User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; > rv:1.8.1.22) Gecko/20090605 Lightning/0.9 Thunderbird/2.0.0.22 > > For me, a mailto link with a target attribute on a webpage works fine. Clicking > that link in Firefox opens up Thunderbird correctly. > > Clicking the same link within an email in Outlook also opens up Thunderbird > correctly. > > However, that same link - when its within an email in Thunderbird - does not > work. No action takes place on clicking the link. > > Kind of ironic...
Summary: clicking news:/nntp:/mailto: link with target="_blank" or "_top" gives no result → clicking news:/nntp:/mailto: link with target="_blank" or "_top" or "foobar" gives no result
Why only remove it for exposed protocols? AFAIK, passing a URL to external apps doesn't pass the target value (it would be pretty weird for a target="goats" link in an email to open in a window that happened to be named goats in Firefox), so either we want to ignore it, or it'll be going to someone who will never see it.
I was afraid of breaking links for i/frames, and maybe extensions like thunderbrowse (no idea how it does it though). As i forgot to handle the broken "foobar" target that's of course a bit less clear ;)
Attachment #387228 - Attachment is obsolete: true
Hm, in the error console I get No chrome package registered for chrome://navigator/content/navigator.xul (which is not coming from the only reference we have for that in mail/.)
I do wonder if this isn't something docshell should be taking care of... We seem to be ending up at http://mxr.mozilla.org/comm-central/source/mozilla/docshell/base/nsDocShell.cpp#7151 with some error code.
Status: ASSIGNED → NEW
Just wondering, are we hitting nsMsgWindow::IsPreferred anywhere? not sure it would make the situation any clearer. I think I possibly need to take a look at this in more detail.
So what, exactly, is the desired behavior here? Does it depend on whether the link is mailto: or not? For _blank the docshell behavior is very simple. We call FindItemWithName, return null from it, and then call Open() on the docshell's window, passing it the name. This is the right behavior for a browser, but maybe not for a mail client. That said, what happens with that Open() call? It seems like the obvious behavior in Thunderbird is that any time content wants to open a new window the load should just be performed in the content window in question instead. That should be pretty easy to set up on your end with no core Gecko changes, right? We even have a pref for it...
(In reply to Mark Banner (:standard8) from comment #22) > Just wondering, are we hitting nsMsgWindow::IsPreferred anywhere? not sure > it would make the situation any clearer. I think I possibly need to take a > look at this in more detail. Yes, nsMsgWindow::IsPreferred is hit for contenttype application/x-mailto Updating the summary, as _top now works as expected. target="foobar" or target="_blank" opens a compose window, but ALSO a blank tab ("loading...")
Summary: clicking news:/nntp:/mailto: link with target="_blank" or "_top" or "foobar" gives no result → clicking news:/nntp:/mailto: link with target="_blank" or "foobar" (also) loads a blank tab
(In reply to Boris Zbarsky (:bz) from comment #23) > So what, exactly, is the desired behavior here? Does it depend on whether > the link is mailto: or not? For mailto: url I'd expect them all to open a new compose window. For nntp, perferably open the group/msg in question inside thunderbird.
Summary: clicking news:/nntp:/mailto: link with target="_blank" or "foobar" (also) loads a blank tab → clicking news:/nntp:/mailto: link with target="_blank" or "foobar" in html mail (also) loads a blank tab
I just got bit by more serious version of this bug - clicking target="_blank" link in HTML e-mail instantly closes Thunderbird 17.0.6 on Windows XP. It seems to depend on how Thunderbird was started - if I opened Thunderbird from a normal shortcut it just opened empty tab and compose message window. But when started from "E-mail" entry in Windows XP Start Menu it crashed instantly without any message. I'm not sure if it depends on my setup - I don't have another XP computer to try to reproduce. Maybe Thunderbird should just ignore "target" in e-mail - it does not make sense in e-mail anyway.
I also checked this, but Thunderbird just seems to stop. There's no crash reporter window and no crash reports in about:crashes...
The current summary line so accurately describes the bug I was going to report anew, so I'll add here: Version: Thunderbird 24.1.0 User Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 OS: Windows 7 Reproducible: Always Steps to reproduce: 1. Open an HTML composition window. 2. Make a mailto link with target=_blank: 2(a). Choose Insert > Link. 2(b). Write some words in the link text. 2(c). Write a mailto address, such as "mailto:test@example.com", in the link location. 2(d). Choose Advanced Edit, add an attribute with the name "target" and the value "_blank", and press OK. 2(e). Press OK. 3. Choose File > Save. 4. Open your Drafts folder and the draft message composed above. 5. Open the link. Actual Results: A new empty tab opens with the title "Loading...", along with the normal composition window. Expected Results: The empty tab should not open (or at least close automatically).
Assignee: mkmelin+mozilla → nobody

This can easily occur with reply to sender links in Yahoo mail now specifying _Blank. It is time to remove this embarrassing action of having mail content interact with the user interface.

We tell users that the HTML in emails is sandboxed from the user interface, but this is demonstrably not the case.

This bug has been driving me insane. I have a number of contacts that include mailto links within their messages weekly. However, their program/service they use to develop these emails always attaches target="_blank" attribute to the links, including the mailto links. This then causes this bug leading to a new tab opening within Thunderbird that simply says "loading" when you click on the link within the email using Thunderbird. I figured by now this would be resolved, but this still plagues me repeatedly every week. You'd think that Thunderbird would automatically handle this by ignoring target= attributes within mailto links or something (within emails inside Thunderbird). In my head, it sounds like an easy fix. However, I have no idea what the backend of TB looks like and how hard it would be to make that happen.

I am just starting to be bitten a lot by this as well - Thunderbird 78.9.0 x64 windows 10.
For different settings of view message body as:

  • original html -> left click opens a new blank tab
  • simple html -> left click opens a new blank tab
  • text -> thunderbird identifies any visible email address, for which left click opens a compose window.

In all cases, right click "compose message to" opens a compose window correctly, so at least that's the easiest workaround.
In all cases TB's status window bottom left shows mailto:x@example.com without any of the other fields in the a element.

I have found a reproducible example in GMail using the Chrome browser as the client.

  • An html formatted email containing text with an email address, x@example.com, but without any mailto url, is sent to gmail recipient.
  • recipient forwards to somebody - GMail partially rewrites the html, identifies the email address and replaces the address with something like <a href="mailto:x@example.com" target="_blank">x@example.com</a>
  • creating a message body using copy/paste of the html has the same result.
  • if you compose a fresh email and include x@example.com then gmail identifies it and formats it as a link without the target="_blank".
  • Likewise if you explicitly create a mailto link in a fresh email then there is no target

also mailtrain (https://mailtrain.org/) application generates html mails with target="_new" in buttons. You can change the link itself but no entities around it. It makes links with mailto: broken in Thunderbird.

Severity: normal → S3

This is apparently working properly now (tested on linux/daily)

Status: NEW → RESOLVED
Closed: 17 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: