Clicking picture link in TB 51b1 opens link in new tab instead of default browser

VERIFIED FIXED in Thunderbird 53.0

Status

Thunderbird
Mail Window Front End
VERIFIED FIXED
8 months ago
8 months ago

People

(Reporter: jlerner10, Assigned: Jorg K (GMT+2))

Tracking

51 Branch
Thunderbird 53.0

Thunderbird Tracking Flags

(thunderbird51 fixed, thunderbird52 fixed, thunderbird53 fixed)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

8 months ago
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20161129164126

Steps to reproduce:

Clicking on links sometimes open in browser and sometimes in a tab in TB.


Actual results:

All of a sudden I am unable to click on a link in an email and have it open in Firefox.
This true whether it is a link by itself or an embedded on in a picture.

I can do a right click on the link and select Open in Browser to accomplish this task.

Any suggestions on how to get it to properly?

FF is set as my default.

I am using TB 51.0b1 and FF 51.0b1

Example of link code

    <a class="postlink" href="https://www.yahoo.com/">https://www.yahoo.com/</a>

    <a href="https://www.yahoo.com/" target="_blank" class="postlink"><img src="http://sr.photos1.fotosearch.com/bthumb/CSP/CSP015/k0152710.jpg" alt="Image"></a>



Expected results:

The links should open in browser.
(Assignee)

Comment 1

8 months ago
Hmm, links open in the browser for me in a Daily build of TB 53.

TB 51 beta has not been released yet, so I don't know where you got this from. I grabbed an unofficial  Tinderbox build of TB 51 beta and links open in a browser.

So, which version are you really using, where did you get it from? Also, maybe this is caused by an incompatible add-on. Try with add-ons switched off, see Help menu.
(Reporter)

Comment 2

8 months ago
I get my TB updates through the Beta channel by going to Help - About.

I still have this problem when I am in Safe Mode with all extensions disabled.

The only add on is Lightning and Google Search.
(Assignee)

Comment 3

8 months ago
Wayne and Joe: Can you please take a look here. Someone claims to have received a TB 51.0b1 which we never built through a channel update. That's just impossible.

Do you mean TB 50 perhaps?
Flags: needinfo?(vseerror)
Flags: needinfo?(jsabash)
(Assignee)

Comment 4

8 months ago
I tried TB 50b3 which is the current official beta and links open in FF with no problem.

I suggest you try a new profile. Start with -p.
(Reporter)

Comment 5

8 months ago
Created attachment 8816519 [details]
TB.png

See attached

From accessing Troubleshooting in TB

Name 	Thunderbird
Version 	51.0
User Agent 	Mozilla/5.0 (Windows NT 6.1; rv:51.0) Gecko/20100101 Thunderbird/51.0
(Assignee)

Comment 6

8 months ago
OK, thanks for posting that. That should have never been shipped. Something has really gone wrong there. We haven't even published release notes for it.

I can see this binary is available at:
https://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/build1/win32/en-US/

Kent, look, someone claims to have received TB 51b1, the failed build, through an update on the beta channel, see comment #2.

Anyway, I downloaded and installed that version and links do open in Firefox for me. So please try on a new profile.
Flags: needinfo?(rkent)
(Assignee)

Updated

8 months ago
Summary: Opening links in browser from TB → Clicking link in TB doesn't open link in default browser, need to use right-click menu
(Reporter)

Comment 7

8 months ago
Created new profile same outcome.

Reminder and note that when I click on a regular link whether it is by itself or in a sentence it opens in a browser.
But if the link is embedded within a picture or logo it opens in a TB tab. Right clicking the picture/logo I have the option to open in a browser and that works.

Comment 8

8 months ago
(In reply to Jorg K (GMT+1) from comment #6)
> OK, thanks for posting that. That should have never been shipped. Something
> has really gone wrong there. We haven't even published release notes for it.
> 
> I can see this binary is available at:
> https://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/
> build1/win32/en-US/
> 
> Kent, look, someone claims to have received TB 51b1, the failed build,
> through an update on the beta channel, see comment #2.
> 

I did a brief look at the tracking emails on 51.0b1 and I don't see any evidence that it ever hit release channels. I don't think it is worth investigating further based on a single comment in a bug.
Flags: needinfo?(rkent)
(Reporter)

Comment 9

8 months ago
You can find it here
http://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/build1/
(Assignee)

Comment 10

8 months ago
Right Kent, I tried to update from TB 50beta and got offered nothing.

(In reply to jlerner10 from comment #9)
> You can find it here
> http://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/
> build1/
Yes, that's an internal staging area. What you download form there is *NOT* supported. This is *NOT* the official channel update.

(In reply to jlerner10 from comment #7)
> Reminder and note that when I click on a regular link whether it is by
> itself or in a sentence it opens in a browser.
> But if the link is embedded within a picture or logo it opens in a TB tab.
> Right clicking the picture/logo I have the option to open in a browser and
> that works.
That's not what you said in comment #0 (quote):

  All of a sudden I am unable to click on a link in an email and have it open in Firefox.
  This true whether it is a link by itself or an embedded on in a picture.

You said that it doesn't open in the browser *irrespective* of whether it's a "link by itself" or "embedded in a picture".

So now the story has changed:
"Normal" links open in the browser, "picture" links open in TB.

So I created myself a message with this body:
  <body text="#000000" bgcolor="#FFFFFF">
    <p> <a href="https://www.yahoo.com/" target="_blank"
        class="postlink"><img moz-do-not-send="true"
          src="http://sr.photos1.fotosearch.com/bthumb/CSP/CSP015/k0152710.jpg"
          alt="Image"></a>
      <br>
    </p>
  </body>

And lo and behold, clicking on the image opens the link as a new tab in TB 51b1, the unofficial version.

That doesn't happen in TB 50beta and I don't see it in TB 53 Daily. I'll look into it further to make sure the problem isn't in TB 52.
Flags: needinfo?(vseerror)
Flags: needinfo?(jsabash)
Summary: Clicking link in TB doesn't open link in default browser, need to use right-click menu → Clicking picture link in TB 51b1 opens link in new tab instead of default browser
(Assignee)

Comment 11

8 months ago
OK, I tried today's Earlybird TB 52 and I don't see the problem there.
I also tried today's Tinderbox build of TB 51 beta and the problem *is* there.

So something that wasn't in TB 50beta, *is* in TB 51 beta but not TB 52 Earlybird. Strange.

Alice, can you look into this a little, find out when the problem started and when it stopped.

I will attach a test case in a minute.
Flags: needinfo?(alice0775)
(Assignee)

Comment 12

8 months ago
Created attachment 8816560 [details]
Test message

Alice, here is the test message.

Import it to the draft folder and click onto the smiley face. Yahoo.com should open. In TB 51 beta it opens in a new tab in TB, in TB 50 beta and TB 52 Earlybird it opens in the external browser, Firefox in my case.

I'd like to understand what's going on here.
Attachment #8816519 - Attachment is obsolete: true
correct, 51.0b1 was never released.  apparently people find out about the candidate links.  we see it quite often.

Comment 14

8 months ago
> TB 52 Earlybird it opens in the external browser

WFM too.
Flags: needinfo?(alice0775)
(Assignee)

Comment 15

8 months ago
Alice, yes, works in TB 52 Earlybird, but it doesn't work in the next beta 51 we're going to release. So it would be good to understand the problem better and see in which Daily is started and where it disappeared. The regression range is mozilla51, so 2016-08-01 to 2016-09-19. About six weeks, so you'll get it to the day in six(?) steps. Could you please do this for me?
Flags: needinfo?(alice0775)
(Assignee)

Comment 16

8 months ago
Sorry, the range for the problem disappearing again is mozilla52, so 2016-09-19 to 2016-11-14. More work, sorry.

Comment 17

8 months ago
The next release is 52, isn't it.
And I think that 51b is not worth.
Flags: needinfo?(alice0775)

Comment 18

8 months ago
The regression range is when merge day. And it happens intermittently...

Last Good:
20161114030319
https://hg.mozilla.org/releases/comm-aurora/rev/e95d9bd956af9a8e8506d857af298d14ef1e36fc
https://hg.mozilla.org/releases/mozilla-aurora/rev/2d9b6132e7d75327e063a15d8e5e279077adf987

First Bad(intermittently):
20161114094843
https://hg.mozilla.org/releases/comm-beta/rev/399ae9d715950a70373b5f5e421e18beec9f9627
https://hg.mozilla.org/releases/mozilla-beta/rev/fd3c6c15ec64591b145ab1b6dd71c5a2e7b8d9b1




This is complexity troubling.
The problem is something differences of build switch(#ifdef etc) between Aurora and Beta.
(Assignee)

Comment 19

8 months ago
So you saying the last TB 51 Aurora on Nov. 14th worked, and the first beta TB 51 on the same day didn't?

Is there any Daily that didn't work?

Comment 20

8 months ago
(In reply to Jorg K (GMT+1) from comment #19)
> So you saying the last TB 51 Aurora on Nov. 14th worked, and the first beta
> TB 51 on the same day didn't?

yes

> 
> Is there any Daily that didn't work?

I do not know. But, at least Last Tb 51.0a1(20160919092917) works.
(Assignee)

Comment 21

8 months ago
Yes, I tried the last Daily 51 of Sept. 19 and it worked. So I'm a little troubled here.

Comment 22

8 months ago
When the problem occurs, the following error is shown in Error console.

TypeError: aTargetNode.rootNode is undefined[Learn More]  contentAreaClick.js:84:7
(Assignee)

Comment 23

8 months ago
Interesting. This points to bug 359183 and bug 1304795 where we made changes in the content area click.

I'll take a look what's going on there. Maybe a faulty uplift??
(Assignee)

Comment 24

8 months ago
I'll confirm this now. We want to eliminate this from the beta.

Alta88, can you please take a look. What are the chances for

function isLinkToAnchorOnPage(aTargetNode)
{
  let url = aTargetNode.rootNode.URL; <== aTargetNode.rootNode undefined?
here?

I have no idea why this only triggers on the specific beta, but it would be good to understand what's going on.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(alta88)
(Assignee)

Comment 25

8 months ago
Further tests:

Current Tinderbox Beta 51 (debug) of Dec 2, 2016 fails and shows:
JavaScript error: chrome://communicator/content/contentAreaClick.js, line 84: TypeError: aTargetNode.rootNode is undefined

Last TB 51 Aurora (non-debug) of Nov 14, 2016 works.
Last Tinderbox Aurora (debug) of Nov 14, 2016 works.

First Tinderbox Beta 51 of Nov 14, 2016 fails and shows:
JavaScript error: chrome://communicator/content/contentAreaClick.js, line 84: TypeError: aTargetNode.rootNode is undefined

I will shout a beer (or another drink) to the person explaining this to me.

Looks like the M-A platform the Aurora versions were built on isn't the M-B platform the Beta versions are built from. But how can |.rootNode| be undefined?
(Assignee)

Comment 26

8 months ago
Here is our answer:
https://dxr.mozilla.org/comm-central/rev/f65ad27efe839ce9df0283840a1a40b4bbc9ead0/mozilla/modules/libpref/init/all.js#5488

.rootNode is disabled in release builds, beta counts as release build.

Also see: https://developer.mozilla.org/en-US/docs/Web/API/Node/rootNode
(Assignee)

Comment 27

8 months ago
Created attachment 8816660 [details] [diff] [review]
1321816-rootnode.patch

Untested, need to build first.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #8816660 - Flags: review?(acelists)

Comment 28

8 months ago
(I dislike such build switch #ifdef. This is hotbed of bugs. And it makes difficulties to find regression window :( )
(Assignee)

Comment 29

8 months ago
BTW, by setting dom.node.rootNode.enabled to false, you can reproduce the problem in *any* version of TB, including Daily.
Flags: needinfo?(alta88)
(Assignee)

Comment 30

8 months ago
Comment on attachment 8816660 [details] [diff] [review]
1321816-rootnode.patch

That doesn't work at all:

JavaScript error: chrome://communicator/content/contentAreaClick.js, line 84: TypeError: aTargetNode.getRootNode is not a function

Apparently it's not implemented in FF:
https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode
Attachment #8816660 - Flags: review?(acelists)
(Assignee)

Comment 31

8 months ago
Created attachment 8816666 [details] [diff] [review]
1321816-rootnode.patch (v2)

This works without regressing bug 359183.

I've tested two cases:
1) Click on smiley in attached message. Opens in browser.
2) Clicked on link to anchor in feed message which was opened in a tab.
   Still positions to this anchor within the tab as implemented by bug 359183.

This bug is blocking TB 51 beta so a quick review would be appreciated.
Attachment #8816660 - Attachment is obsolete: true
Attachment #8816666 - Flags: review?(alta88)
Attachment #8816666 - Flags: review?(acelists)

Comment 32

8 months ago
Comment on attachment 8816666 [details] [diff] [review]
1321816-rootnode.patch (v2)

Review of attachment 8816666 [details] [diff] [review]:
-----------------------------------------------------------------

This even looks cleaner, as URL is an attribute of the document.
Attachment #8816666 - Flags: review?(acelists) → review+
(Assignee)

Comment 33

8 months ago
Thanks. Let's wait for confirmation from Alta88, it's his code after all, yes?

Comment 34

8 months ago
Yeah, looks like .rootNode is disabled, claimed to be replaced by getRootNode(), but that one does not have support marked on the mdn page.

But m-c code uses .rootNode quite a lot. Is that all abandoned or unshipped code?
(Assignee)

Comment 35

8 months ago
(In reply to :aceman from comment #34)
> But m-c code uses .rootNode quite a lot. Is that all abandoned or unshipped
> code?
Looks like it ships with Devtools in Aurora? Maybe we should ask someone what's the story with this, but too late now for TB. I need a patch/uplift *now* ;-)
> This bug is blocking TB 51 beta so a quick review would be appreciated.

Indeed. We are otherwise ready to build, and would like to do so ASAP.
Component: Untriaged → Mail Window Front End
(Assignee)

Comment 37

8 months ago
Comment on attachment 8816666 [details] [diff] [review]
1321816-rootnode.patch (v2)

We will have to live with one review then. I checked the documentation again, this is good to go.
Attachment #8816666 - Flags: review?(alta88)
Attachment #8816666 - Flags: approval-comm-beta+
Attachment #8816666 - Flags: approval-comm-aurora+
(Assignee)

Comment 38

8 months ago
C-C (TB 53): https://hg.mozilla.org/comm-central/rev/203647b7c84f2e3bb6e97750b6aaaf80b027d56c
C-A (TB 52): https://hg.mozilla.org/releases/comm-aurora/rev/f0c46de6e2ee67a7519da533adfc3dab4423b57b
C-B (TB 51): https://hg.mozilla.org/releases/comm-beta/rev/ee87c0a48cee7904c59c94d157891f73ccaf5187

(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #36)
> Indeed. We are otherwise ready to build, and would like to do so ASAP.
Go!
C-B changeset
ee87c0a48cee7904c59c94d157891f73ccaf5187 or ee87c0a48cee
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
status-thunderbird51: --- → fixed
status-thunderbird52: --- → fixed
status-thunderbird53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0

Comment 39

8 months ago
(In reply to :aceman from comment #34)
> But m-c code uses .rootNode quite a lot. Is that all abandoned or unshipped
> code?

Looks like rootNode in devtools is just a variable with the same name, nothing to do with what this code was using.
(Assignee)

Comment 40

8 months ago
Dear reporter,
thank you for reporting this bug. While using an unofficial build of TB 51 beta1 build1 you've detected a problem which was only visible in that version of Thunderbird. We have corrected this problem and the new official beta version will be available soon (hopefully), being compiled at time of writing.
I'm not sure whether your unofficial version will auto-update, so please watch
https://www.mozilla.org/en-US/thunderbird/channel/
Thanks again.

Comment 41

8 months ago
Won't be released due to a problem with repacks, but for verification this is verified in User Agent     Mozilla/5.0 (Windows NT 10.0; rv:51.0) Gecko/20100101 Thunderbird/51.0
Status: RESOLVED → VERIFIED
(Reporter)

Comment 42

8 months ago
(In reply to Jorg K (GMT+1) from comment #40)
> Dear reporter,
> thank you for reporting this bug. While using an unofficial build of TB 51
> beta1 build1 you've detected a problem which was only visible in that
> version of Thunderbird. We have corrected this problem and the new official
> beta version will be available soon (hopefully), being compiled at time of
> writing.
> I'm not sure whether your unofficial version will auto-update, so please
> watch
> https://www.mozilla.org/en-US/thunderbird/channel/
> Thanks again.

No problem.
I am glad that it was found and fixed before it became a final version.
(Assignee)

Comment 43

8 months ago
(In reply to jlerner10 from comment #42)
> I am glad that it was found and fixed before it became a final version.
I don't want to promote unofficial builds, but since you're already using one, you might as well grab a new one ;-)
https://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/build2/
(Reporter)

Comment 44

8 months ago
(In reply to Jorg K (GMT+1) from comment #43)
> (In reply to jlerner10 from comment #42)
> > I am glad that it was found and fixed before it became a final version.
> I don't want to promote unofficial builds, but since you're already using
> one, you might as well grab a new one ;-)
> https://archive.mozilla.org/pub/thunderbird/candidates/51.0b1-candidates/
> build2/

Thanks.

Just downloaded and installed.
It is working properly now.

Thanks for the fix.
Good job.

Comment 45

8 months ago
was afk til now, thanks for fixing it.  sort of unexpected that dom members are experimental like this, but it is documented..
You need to log in before you can comment on or make changes to this bug.