Opened on 01/23/2015 at 02:12:29 PM
Closed on 01/27/2015 at 10:49:58 AM
#1856 closed defect (fixed)
"Block element" behaves unexpected with SVG elements
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
How to reproduce
- Go to http://nytimes.com/
- Click ABP logo
- Choose "Block element"
- Move the pointer over the NYT logo
- Click the logo
Observed behaviour
The logo is embedded as inline <svg> element. Moving the mouse over the it doesn't highlighted the element. Clicking it brings up the dialog suggesting a filter for a different element.
Expected behaviour
Inline <svg> elements are a corner case, and handling them correctly is complicated. Some attributes differ in SVG (e.g. src vs. link:href). And getting the position of an SVG element is non-trivial since you can't rely on DOM properties like offsetLeft/offsetTop. So it's probably not worth dealing with them.
However, instead breaking "Block element" functionality, the parent HTML elements should be considered when hovering/clicking an SVG element. So on http://nytimes.com/ the <h2 class="branding"> element should be highlighted/blocked, when hovering/clicking the logo.
Attachments (0)
Change History (2)
comment:1 Changed on 01/23/2015 at 02:20:39 PM by sebastian
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 01/27/2015 at 10:49:58 AM by sebastian
- Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
- Resolution set to fixed
- Status changed from reviewing to closed
https://hg.adblockplus.org/adblockpluschrome/rev/af8a17e1c85b