External links in message compose open in a Thunderbird tab
Categories
(Thunderbird :: Message Compose Window, defect, P2)
Tracking
(Not tracked)
People
(Reporter: freaktechnik, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: good-first-bug, regression)
STR:
- Get a message with a link in it (
<a href="..." target="_blank">) - Reply to it
- Click on the link in the compose window
Expected result: the link opens in the system browser.
Actual result: the link opens in Thunderbird.
I had this with 156.0b2.
| Reporter | ||
Updated•18 days ago
|
Updated•18 days ago
|
@Martin: Can you clarify the bug. Clicking on a link in the compose window has no effect, see bug 695142. Just tried it in Daily of the end of October.
@Toby: What makes you think this is a "good first bug" (if it were a bug in the first place).
| Reporter | ||
Comment 2•18 days ago
|
||
(In reply to Helge H. from comment #1)
@Martin: Can you clarify the bug. Clicking on a link in the compose window has no effect, see bug 695142. Just tried it in Daily of the end of October.
The relevant thing from the STR is target="_blank". Without it the link doesn't do anything, yes.
Comment 3•18 days ago
|
||
(In reply to Helge H. from comment #1)
@Toby: What makes you think this is a "good first bug" (if it were a bug in the first place).
I had asked my team for advice on the classification as a "good first bug". If you don't believe that it is so easy, I can adjust - but we've had a recent influx of supercharged contributors who are tackling much larger issues, so this felt about right.
(In reply to Martin Giger [:freaktechnik] from comment #2)
The relevant thing from the STR is
target="_blank". Without it the link doesn't do anything, yes.
My AI says:
It's not editor code at all — it's the message-content link click handling that bug 2060734 (Aug 13 2026, D316451) accidentally extended to the compose editor:
- The compose <editor> (messengercompose.xhtml:2458) has messagemanagergroup="browsers", so RelaxedLinkClickHandler (MailGlue.sys.mjs:319) is registered on its content document.
- Before that bug, LinkClickHandlerChild.handleEvent() bailed out on this.manager.isInProcess — and the compose editor is in-process (chrome code pokes its docShell directly). The overhaul removed that guard.
- Now on click on <a target="_blank">: canNavigate() (LinkClickHandlerChild.sys.mjs:28) returns false because no browsing context named _blank exists → event.preventDefault() + sendAsyncMessage("openLinkInNewTab", {href}).
- LinkClickHandlerParent → LinkHelper.openLinkInNewTab (LinkHelper.sys.mjs:119) → tabmail.openTab("contentTab", ...) in the most recent 3pane window.
That's why only target="_blank" links react: links without a target pass canNavigate (returns true), the actor stays quiet, and Mozilla's TriggerLinkClick gate (aContent->IsEditable(), dom/base/nsContentUtils.cpp:7601) still swallows the default action. Likely fix: skip editable documents in the child actor, or don't register that actor group for the compose editor.
(In reply to Toby Pilling [:tobyp] from comment #3)
I had asked my team for advice on the classification as a "good first bug". If you don't believe that it is so easy, I can adjust - but we've had a recent influx of supercharged contributors who are tackling much larger issues, so this felt about right.
Oh, all those vibe coders ;-) - The AI analysis above will make it easier.
I was surprised that clicks on links work at all. In any case, IMHO, bug 695142 should be fixed first. That's dead easy since you can just copy your downstream project's solution (or polish it).
Description
•