Opened 5 months ago

Last modified 5 months ago

#7170 new defect

bug: ABP does not unhide nodes no longer matching :-abp-has(...) procedural cosmetic filters

Reported by: krystian3w Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords:
Cc: kzar, sebastian, hfiguiere, mjethani, mapx, greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

Description (last modified by mapx)

Test links

https://www.e-forma.pl/3575,7nutrition-citrulline-malate-b6-250g-cytrulina.html
http://homeoapteka.pl/2822,bonimed-ziolowy-balsam-kregowy-ojca-grzegorza-100-g.html

Problem:
How can I block only newsletter pop-up when filter:

e-forma.pl,homeoapteka.pl#?##colorbox:-abp-has(#newsletter_colorbox)

breaks too gallery and I cannot see bigger photos products (magnifier/loupe plugin on site is should not enough for all)?

Overlay/background I can detect by style tag and cut only for newsletter:

e-forma.pl,homeoapteka.pl###cboxOverlay:not([style="opacity: 0.9; visibility: visible; display: block; cursor: pointer;"])

Helpful graphics:

https://i.imgur.com/7s9d5eW.png
https://i.imgur.com/7s9d5eW.png

Similar bug fixed in uBlock Origin: /uBlockOrigin/uBlock-issues/issues/341

Change History (12)

comment:1 Changed 5 months ago by mapx

  • Cc kzar sebastian hfiguiere mjethani mapx added
  • Component changed from Unknown to Platform

comment:2 in reply to: ↑ description Changed 5 months ago by krystian3w

Last edited 5 months ago by mapx (previous) (diff)

comment:3 Changed 5 months ago by mapx

  • Description modified (diff)

comment:4 Changed 5 months ago by mapx

Steps:

  1. add:

e-forma.pl#?##colorbox:-abp-has(#newsletter_colorbox)
e-forma.pl###cboxOverlay

  1. go to https://www.e-forma.pl/3575,7nutrition-citrulline-malate-b6-250g-cytrulina.html
  2. The newsletter popup is hidden
  3. click the object in the page => the magnifier tool does not work because the filter above (first one) is hiding colorbox div even not containing newsletter_colorbox

ABP should hide only the first 1 colorbox but not the second 1

Last edited 5 months ago by mapx (previous) (diff)

comment:5 Changed 5 months ago by mapx

  • Summary changed from ABP does not unhide nodes no longer matching :-abp-has(...) procedural cosmetic filters to bug: ABP does not unhide nodes no longer matching :-abp-has(...) procedural cosmetic filters

comment:6 Changed 5 months ago by krystian3w

the magnifier tool does not work because the filter above


magnifier tool works, no works gallery after click on picture:

https://i.imgur.com/T13d679.png

with filter above send.


I "found" workaround with (but have to many minuses):

or

minuses:

  • this is no works if background code no have specific attrib e.g. :not([style="..."]) and no puted above pop-up html code in dom tree.
  • the use of this workaround can further cut mustows of other pop-ups with a identical background and were not a newsletter (save only those with a useful preview of photos in the gallery).
  • also closing newsletter pop-up in the past causes the workaround to not work and still break gallery.
Last edited 5 months ago by krystian3w (previous) (diff)

comment:7 Changed 5 months ago by krystian3w

Another problematic domains with same type newsletter:

oponyalbert.pl
meblezagrosze.pl
annalotan.pl

embeded by colorbox plugin.

Last edited 5 months ago by krystian3w (previous) (diff)

comment:8 Changed 5 months ago by mapx

  • Cc greiner added

comment:9 Changed 5 months ago by mjethani

I haven't looked into the specific example posted in the issue description, but I'll just say that element hiding emulation (:-abp-has(), etc.) isn't supposed to unhide anything, so this is sort of "by design". It would be nice if it did work, and we could look into it, but the effort would be non-trivial.

For one, we wouldn't even know which elements we hid because we set style="display: none !mportant" instead of using a style sheet. We've pretty much abandoned our plans to use a style sheet (#6504) because Chromium won't implement tabs.removeCSS (even though I have implemented all the underlying changes, see bug #608854).

comment:10 Changed 5 months ago by mapx

So, you are saying abp-has is useless => ABP will hide colorbox even if #newsletter_colorbox is not a child of colorbox
(uBo fixed the issue)

comment:11 Changed 5 months ago by mjethani

It may be useless right now for the given use case.

For what it's worth, :-abp-has() is "useless" (or unusable) for several other reasons (e.g. #6813). We intend to address these issues next year.

Right now there are only 34 filters in EasyList that use element hiding emulation:

curl https://easylist-downloads.adblockplus.org/easylist.txt | grep '#?#' | wc -l

comment:12 Changed 5 months ago by krystian3w

We intend to address these issues next year.

As I did not expect it, they would fix it in three days in uBO addon (beta / dev version).


As if the links from the first post down in next year, just try another product available in shops, just as I wrote it has a lot of disadvantages.


For one, we wouldn't even know which elements we hid because we set style="display: none !mportant" instead of using a style sheet.

annalotan.pl,e-forma.pl,homeoapteka.pl,oponyalbert.pl,meblezagrosze.pl###cboxOverlay:not([style="opacity: 0.9; visibility: visible; display: block; cursor: pointer;"])
annalotan.pl,e-forma.pl,homeoapteka.pl,oponyalbert.pl,meblezagrosze.pl###cboxOverlay:not([style="opacity: 0.9; visibility: visible; display: block; cursor: pointer;"]) ~ #colorbox

I block overlay pop-up no match with gallery shop ("workaround").

Last edited 5 months ago by krystian3w (previous) (diff)
Note: See TracTickets for help on using tickets.