Open Bug 1766116 Opened 4 years ago Updated 3 years ago

onCreatedNavigationTarget not triggered when tab is created from external application

Categories

(WebExtensions :: General, defect, P3)

Firefox 99
defect

Tracking

(Not tracked)

People

(Reporter: b3a3imewbt, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:1001.0) Gecko/20100101 Firefox/97.0

Steps to reproduce:

  1. created an addon, which should prevents duplicate tab creation (from links and external applicaiton openers) by hooking into the onCreatedNavigationTarget event (ref. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation/onCreatedNavigationTarget )
  2. sideloaded the addon into browser (via about:debugging )
  3. clicked the same link in another application (thunderbird) or use xdg-open http://example.net 2 times.

Since the url/navigation target should be available at the time of the tab creation i currently assume this to be a bug, since the only stated reason when this event will not be fired is when a tab is created without a navigation target.

Actual results:

The onCreatedNavigationTarget did not fire and the browser instance opened 2 tabs with the the same link targets.

Expected results:

The onCreatedNavigationTarget event should have fired both times and the second tab creation should have allow the addon to instantly closed the duplicate tab.

Severity: -- → S3
Priority: -- → P3

Alex, can you please confirm this on other platforms?

Flags: needinfo?(acornestean)

Can you please attach the addon used for this issue in order to try to reproduce it ?

Flags: needinfo?(acornestean)

I reduced the addon only show the "essential" part. (aka. that the event is not triggered)
It now only calls "console.log" when the onCreatedNavigationTarget event/callback is triggered.

By installing it and looking at the output (about:debugging => "This Firefox" => Inspect)
it should shows, that there is no event when links are opend via external applications (for example xdg-open "https://example.net")

Hope this is good enough for reproduction, if not, just let me know and i'll try to improve it.
And thanks for taking a look at this.

Flags: needinfo?(vcarciu)

Hello,

Thanks for quick response.

I think that I managed to reproduce the issue using Nightly Firefox and Windows 10x64 , but please confirm that I correctly performed the steps:

  1. I installed the provided addon via about:debugging , then I entered in the console from "Inspect" button in about:debugging tab
  2. From Thunderbird, I clicked 2 times on "https://example.net link"
  3. I checked if any event was fired, but no new events were recorded in the console and the duplicate tabs were opened without any issues.

If this is the correct way to reproduce the problem, I will try the scenario on Mac platform too and I will change the "Unconfirmed " status to "New"

Flags: needinfo?(vcarciu)

@vcarciu: The steps are absolutely correct.

Thank you.

I can also confirm that the issue is reproducible on MacOS Mojave 10.14.6 and FF release 99.0.1

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

Info: issue is reproducible on FF release 100.0

Info: Issue is reproducible on FF release 104.0

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: