Open Bug 2069912 Opened 2 months ago Updated 18 days ago

External links in message compose open in a Thunderbird tab

Categories

(Thunderbird :: Message Compose Window, defect, P2)

Thunderbird 156
defect

Tracking

(Not tracked)

People

(Reporter: freaktechnik, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: good-first-bug, regression)

STR:

  1. Get a message with a link in it (<a href="..." target="_blank">)
  2. Reply to it
  3. 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.

Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P2

@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).

(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.

(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:

  1. The compose <editor> (messengercompose.xhtml:2458) has messagemanagergroup="browsers", so RelaxedLinkClickHandler (MailGlue.sys.mjs:319) is registered on its content document.
  2. 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.
  3. 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}).
  4. 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).

Keywords: regression
Regressed by: 2060734

Great stuff, many thanks Helge!

See Also: → 695142
You need to log in before you can comment on or make changes to this bug.