Opened on 01/23/2015 at 04:23:40 PM

Closed on 01/27/2015 at 10:59:41 AM

#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):

http://codereview.adblockplus.org/6217022228660224

Description (last modified by sebastian)

How to reproduce

  1. Go to http://nytimes.com/
  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.

Attachments (0)

Change History (3)

comment:1 Changed on 01/23/2015 at 04:27:40 PM by sebastian

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

comment:2 Changed on 01/25/2015 at 12:04:15 PM by sebastian

  • Description modified (diff)

comment:3 Changed on 01/27/2015 at 10:59:41 AM by sebastian

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

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.