Opened 6 years ago

Closed 6 years ago

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


How to reproduce

  1. Go to
  2. Click ABP logo
  3. Choose "Block element"
  4. Move the pointer over the NYT logo
  5. 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 the <h2 class="branding"> element should be highlighted/blocked, when hovering/clicking the logo.

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.