Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5648 closed change (fixed)

Add lib/popupBlocker.js to Firefox version with a dynamic check for webNavigation.onCreatedNavigationTarget support

Reported by: mjethani Assignee: mjethani
Priority: P2 Milestone: Adblock-Plus-3.0-for-Firefox
Module: Platform Keywords:
Cc: sebastian, trev Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



Firefox added support for webNavigation.onCreatedNavigationTarget in version 54, but the WebExtensions version of ABP for Firefox still doesn't support popup blocking even in newer versions of the browser.

What to change

Edit metadata.gecko-webext to include lib/popupBlocker.js in lib/adblockplus.js

In lib/popupBlocker.js check for the existence of webNavigation.onCreatedNavigationTarget before trying to add the event listener.

Hints for testers

Simply add the filter $popup to test this.

On Firefox 54 for desktop, any time a page is opened in a new tab/window, either by user action (e.g. by clicking on "Open Link in New Tab" in the context menu) or programmatically (e.g. the page's JavaScript code calling with a URL), the action should get blocked with this filter (i.e. the tab/window should get prevented from opening). On Firefox 55 onwards you should be able to see this in the browser's devtools panel. Note that popups that are already blocked by the browser's own built-in popup blocker won't be blocked by Adblock Plus.

On Firefox 54 for Android, only tabs opened with will get blocked.

Change History (5)

comment:1 Changed 3 years ago by mjethani

  • Cc sebastian trev added

comment:2 Changed 3 years ago by sebastian

  • Priority changed from Unknown to P2
  • Ready set

comment:3 Changed 3 years ago by abpbot

A commit referencing this issue has landed:
Issue 5648 - Include lib/popupBlocker.js on Firefox

comment:4 Changed 3 years ago by mjethani

  • Resolution set to fixed
  • Review URL(s) modified (diff)
  • Status changed from new to closed

comment:5 Changed 3 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next

Please don't forget to set the corresponding milestone when closing issues.

Note: See TracTickets for help on using tickets.