Closed Bug 1422292 Opened 7 years ago Closed 7 years ago

Allow adblockers to be able to block popups from being created, instead of having to wait for them to be created and then close them

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: rick3162, Unassigned)

Details

(Using FF 57 and latest Adblock Plus/uBlock Origin, in win10).


I've noticed that, popups that are managed (not by FF's built-in popup blocker but) from adblocker extensions such as  Adblock Plus and uBlock Origin, appear momentarily before getting blocked.

The fact that currently you get to catch a glimpse of the animation of the popup window expanding/flashing in the screen, before it gets blocked,
it gives you the false impression that a new window(with the popup) might still exist, 
and so you have to double-check the Firefox taskbar icon to make sure that there's no extra Firefox window anymore.

I see this issue this in both most popular adblocker extensions, Adblock Plus and uBlock Origin, in both Firefox and Chrome.


I was wondering, could Firefox be improved in some way to allow adblocker extensions to completely block such popups, i.e. not to appear at all, instead of appearing momentarily before getting blocked?
For example, I get such popups as I browse torrent search results in thepiratebay.org.

STR:
(using ABP 3.0.1 in FF 57)
open https://thepiratebay.org/recent, delete all thepiratebay.org cookies 
and then click the blue "Next" link (results' page #2 will open).
Now click that Next link 2 more times (to navigate to results' page 3 and 4 respectively): 
a popup (managed by ABP) will surely appear momentarily each time.
Bugs related to the extensions should be reported directly to the extension developer:
https://adblockplus.org/bugs#reporting
https://github.com/chrisaljoudi/ublock/issues
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(rick3162)
Resolution: --- → INVALID
But, I had already reported it to ABP forum https://adblockplus.org/forum/viewtopic.php?f=4&t=50282 almost a year now,
and the only reply I got -it was from an old/experienced forum member- was:

> If it were possible, they would have done that; FTR, uBlock Origin also has to use that clumsy method to deal with unwanted popups.

which gave me the impression that currently it's impossible for adblockers to manage popups without them appearing momentarily before getting blocked,
and so I was wondering whether it's the browser that limits them,
i.e. whether there's room for improvement for Firefox, to facilitate adblockers in managing popups.
Flags: needinfo?(rick3162)
I tried the link you gave on a Firefox with a new empty profile.
Sure enough, the first time I clicked on the blue arrow I saw a popup (empty = no extension at all). So I installed ublock origin and clicked again on the blue arrow... 14 times... Never caught a glimpse of any popup.

I can't even reproduce your issue with a new profile and only one adblocker (not customized).
The issue with the link I gave occurs using AdBlock Plus, not uBlock Origin.

Please try again with fresh profile and ABP 3.0.1: it will surely occur.
You mentioned in your first comment that it appeared with both extensions. Then pasted the comment made on ABP support forums that uBlock uses the same method.
But I tested with uBlock origin and did not see this behavior, meaning that uBlock developers may have found a way to solve this issue (perhaps during the last 12 months). So if it's possible and uBlock manages but ABP does not, it's an ABP bug, not a firefox one.
well, uBo is using specific filters which nullify the various inline scripts, so it wont wait for the popup and then close it.

The filter in this case is:
thepiratebay.*##script:inject(abort-on-property-read.js, _wm)

ABP didn't implement such advanced filters yet, lastly they seem to be more opened but ... who knows when will be implemented.

So, @Kostas, if you want a fix to your issue just use uBo.

@Flore, maybe the users expect to have some tools already integrated in firefox (not the currently not very strong / basic anti popup approach..).

See also what chrome is preparing (will provide weapons against tabunders / popunders).
https://www.bleepingcomputer.com/news/security/google-chrome-will-block-tab-under-behavior/
> You mentioned in your first comment that it appeared with both extensions. Then pasted the comment made on ABP support forums that uBlock uses the same method.

Yes, the issue appears with both extensions, but not in all test cases:
some are not present in uBO because of it's more advanced 'inject' filters.
But for other test cases the issue occurs (see below).

The comment on ABP support forums is about a year old, near to when I started the topic in that forum, and I was still using ABP. I posted it here because it was the only reply I had got.

> So, @Kostas, if you want a fix to your issue just use uBo.

I have already switched uBO sometime now. My issue is not about thepiratebay, I'm aware that it doesn't appear in uBO.
I posted the example with ABP just to provide an example where the issue occurs.



Anyway, here are quickly reproducible test cases, http://raymondhill.net/ublock/popup.html:
in tests: 2-6, 8 and 11 (see [1] for descriptions) the popups appear momentarily before getting blocked, 
for both uBO and ABP (the popups are blocked by EasyList), in both Firefox and Chrome.


[1] Test descriptions:

 2. direct url popup
 3. about:blank
 4. data:uri refresh
 5. data:uri multi refresh
 6. data:uri iframe
 8. data:uri link redirect
11. data:uri xhr load
In other words, my suggestion (independently of uBO's method which nullifies the inline scripts)
is the adblockers to be able to block a popup from being created, 
instead of waiting for the popup to be created and then close it.
Summary: Pop-ups managed by adblocker extensions appear momentarily before getting blocked → Allow adblockers to be able to block popups from being created, instead of having to wait for them to be created and then close them
You need to log in before you can comment on or make changes to this bug.