Opened 6 years ago

Closed 6 years ago

#1609 closed defect (fixed)

"Block element" throws errors when generating filters for elements without selectors

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


How to reproduce

  1. Go to
  2. Click ABP icon
  3. Choose "Block element"
  4. Select one of the videos

Observed behaviour

You get following error on the JavaScript console:

Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Document': The provided selector is empty.

That is because no selector (for highlighting purposes) can be generated for that element. Hence document.querySelectorAll() is called with an empty string, resulting in this error.

Expected behaviour

The case of no selectors must be handled, that no error is thrown.

Change History (2)

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

  • 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.