Opened on 11/26/2014 at 09:47:23 AM
Closed on 11/26/2014 at 05:10:35 PM
#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): |
Description
How to reproduce
- Go to http://9gag.com/gif
- Click ABP icon
- Choose "Block element"
- 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.
Attachments (0)
Change History (2)
comment:1 Changed on 11/26/2014 at 09:49:44 AM by sebastian
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 11/26/2014 at 05:10:35 PM 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.
https://hg.adblockplus.org/adblockpluschrome/rev/5b14a9c04694