Closed Bug 1907269 Opened 1 year ago Closed 1 year ago

Open tel: link with target=_blank doesn't trigger the default action

Categories

(Firefox :: File Handling, defect)

Firefox 128
Desktop
All
defect

Tracking

()

VERIFIED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 130+ verified
firefox128 --- wontfix
firefox129 --- wontfix
firefox130 --- verified

People

(Reporter: simube, Assigned: nika)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0

Steps to reproduce:

I have a link:
<a href="tel:0123456789" target="_blank">call me</a>

When I click the link, it does not trigger the action set under settings/applications neither it asks for how to open the tel-link.

When I remove the target or set it to "_self", the link works:
<a href="tel:0123456789">call me</a>

Actual results:

It opened a new blank page with tel:0123456789 in the url-field.

Expected results:

My default application for tel-links should open

Ugh, that is not good. Thanks for the report and the clear description of exactly what is wrong. I'm trying to track down when this broke.

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → Desktop
Duplicate of this bug: 1909397

Previously this load would be allowed due to the "web-controlled" check
failing to reject the load. This patch instead bases it on the
docshell.newWindowTarget flag, which is set for the first load in a new
DocShell due to a call to window.open or target=_blank.

This required making the external protocol channel be a property bag so
that the flag can be set on the channel. In the future we may want to
switch this flag to being set in a more generic way which is less
specific to the channel.

Assignee: nobody → nika
Status: NEW → ASSIGNED

In that patch I refined a specific check (https://searchfox.org/mozilla-central/rev/de46cd99a7d1634058b511a3f546a970763e5048/uriloader/exthandler/nsExternalHelperAppService.cpp#1103-1109). This check was added in bug 1606797 and stated that it was only intended to allow loads in non-web-controlled about:blank documents even if they otherwise wouldn't be allowed.

I think this exemption was probably actually to allow this specific case, but I was confused by the comment. I'll propose an alternative check which we could do here which might be better in this situation.

Flags: needinfo?(nika)
Duplicate of this bug: 1909117
Flags: in-testsuite?
Duplicate of this bug: 1908780
Attachment #9414454 - Attachment description: Bug 1907269 - Allow pop-up windows to load external URIs for first load, r=gijs! → Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=gijs!
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/218c98804a83 Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs https://hg.mozilla.org/integration/autoland/rev/3270496f12d8 Part 2: Test that external URIs load in noopener pop-ups, r=smaug
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/a2787722d6b7 Part 1: Allow pop-up windows to load external URIs for first load, r=Gijs https://hg.mozilla.org/mozilla-central/rev/a9ebaddfe50c Part 2: Test that external URIs load in noopener pop-ups, r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
See Also: → 1911045

Comment on attachment 9414454 [details]
Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=gijs!

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Potential site breakage
  • User impact if declined: Clicking on some links which should open external URIs (e.g. zoom:// or tel:) will not work as expected
  • Fix Landed on Version: 130
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): In the current version of the patch, this is a strict relaxing of the rules around opening external protocol handlers relative to what is currently landed in 128, so should not lead to any new breakage due to some external URIs not being allowed to load.
Flags: needinfo?(nika)
Attachment #9414454 - Flags: approval-mozilla-esr128?

Comment on attachment 9416670 [details]
Bug 1907269 - Part 2: Test that external URIs load in noopener pop-ups, r=smaug!

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: See part 1
  • User impact if declined: See part 1
  • Fix Landed on Version: 130
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): See part 1
Attachment #9416670 - Flags: approval-mozilla-esr128?

Comment on attachment 9414454 [details]
Bug 1907269 - Part 1: Allow pop-up windows to load external URIs for first load, r=gijs!

Approved for esr 128.2.0, thanks.

Attachment #9414454 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
Attachment #9416670 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+

I was able to reproduce it on Win11x64 using FF build 128.0.2 and Trivial testcase, verified as fixed on Win11x64/Mac 12.6 using FF builds 130.0b1 and 131.0a1.

Blocks: 1134514
Duplicate of this bug: 1909862
Duplicate of this bug: 1914594
No longer duplicate of this bug: 1914594

(In reply to Monica Chiorean from comment #18)

I was able to reproduce it on Win11x64 using FF build 128.0.2 and Trivial testcase, verified as fixed on Win11x64/Mac 12.6 using FF builds 130.0b1 and 131.0a1.

Also verified that using Firefox 128.2.0esr this is fixed on Windows 11, macOS 13.6 and Ubuntu 22.04, the Application prompt is displayed and if a default app is added the app is opened.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: