Opened 6 years ago

Closed 6 years ago

#1864 closed defect (fixed)

"Block element" doesn't highlight matching elements (in red) sometimes

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

Description (last modified by sebastian)

How to reproduce

  1. Go to
  2. Click the ABP icon
  3. Choose "Block element"
  4. Click the top banner with the NYT logo

Observed behaviour

The banner stays highlighted in yellow (as before clicking). And TypeError: Cannot read property 'description' of undefined shows up in the JavaScript console. That's because there is another element with the class branding, inside a hidden element. Hence addElementOverlay() returns null. However, this case isn't handled in highlightWithOverlay(), resulting in that error.

Expected behaviour

That no overlay can be created for hidden elements should be handled, not throwing any errors, always highlighting all visible matching elements in red when an element was selected.

Change History (3)

comment:1 Changed 6 years ago by sebastian

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

comment:2 Changed 6 years ago by sebastian

  • Description modified (diff)

comment:3 Changed 6 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.