Skip to content

Popup/popunder blocking broken after opening uBO's dashboard through popup panel #3057

@gorhill

Description

@gorhill

First reported here by @kasper93.

This is unrelated to the regression, which was fixed.

This affects all versions of Firefox, including in Nightly.

The repro steps are quite simple (from my end, both with Firefox 55 and Nightly):

  1. Launch browser.
  2. Open popup test page in a new tab.
  3. Verify that the popup from the first test ("direct url tab") is properly blocked.
    • uBO's popup blocking depends on webNavigation.onCreatedNavigationTarget to properly set the sourceTabId property.
  4. Open uBO's dashboard (or logger) through uBO's popup panel.
    • The issue can't be reproduced if opening the dashboard from uBO's preferences in about:addons.
  5. Go back to the popup test page previously opened above, and repeat the test in 3.

Result: uBO fails to properly filter the popup.

After much investigation, it turns out that the one call to vAPI.closePopup() in vapi-common.js is causing this issue:

window.open('','_self').close();

The issue does not exist with Chromium, with the same code path.

I have no idea why this happens. It appears Firefox's internals are in a bad state after step 4: the sourceTabId from webNavigation.onCreatedNavigationTarget is always -1.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions