Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3636 closed defect (fixed)

"Block element" dialog hides element even if added filters don't apply due to $genricblock

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.11-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29335874

Description (last modified by sebastian)

How to reproduce

  1. Add filter @@||google.com^$genericblock
  2. Go to https://google.com/
  3. Click ABP toolbar icon
  4. Choose "Block element"
  5. Click on the Google logo
  6. Remove the $domain option from the generated filters
  7. Add filters
  8. Reload the page

Observed behaviour

When adding the filters, the the Google logo is instantly removed. When reloading the page however, the logo shows up again. That is because the logic that checks whether the element is supposed to be blocked, when adding the filters, doesn't consider the $genericblock exception rule added earlier, and therefore hides the element, even though the new filters don't actually match.

In some edge cases, this might also cause elements to be hidden that aren't actually blocked, when loading documents that are whitelisted by $genericblock, since the same logic is used for the element collapsing. This issue is the equivalent of #3170 for the $genericblock option.

Expected behaviour

The elements should not be hidden when a $genericblock exception rule for the document whitelists the added filters.

Change History (4)

comment:1 Changed 3 years ago by sebastian

  • Description modified (diff)

comment:2 Changed 3 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 3 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:4 Changed 3 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. Couldn't reproduce the issue with the steps and tried it out on both Google and the BBC logo.

ABP 1.10.2.1558
Chrome 35 / 47 / Windows 7 x86
Chrome 48 / Ubuntu 14.04 x64
Opera 25 / 35 / Windows 7 x86
Opera 35 / Ubuntu 14.04 x64
Safari 6 (OS X 10.8) / Safari 8 (OS X 10.10) / Safari 9 (OS X 10.11)

Last edited 3 years ago by Ross (previous) (diff)
Note: See TracTickets for help on using tickets.