Clipped SVG polygon receives mouse events -


here facts:

  1. i have div rounded corners containing svg element rounded corners creates circle.

  2. inside circle (svg) drawing 4 polygons make out different circle quadrants.

  3. the polygons respond hover changing color - when user mouse on specific quadrant in circle - lights up.

  4. the svg , div containing svg both have overflow:hidden css directive.

  5. when mouse on area outside circle (but inside clipped rectangle of polygon) - corresponding quadrant lights up...

why element responding mouse on though hovering on clipped area? how can make sure not happen? (without creating occluding transparent elements - want able touch in layer below...).

edit: added fiddle requested:

http://jsfiddle.net/jvqd8/

in fiddle - note surrounding div bordered red line. polygons (in blue) clipped red border (div), , when hover on polygon becomes lighter shade of blue. polygon highlights outside area of red circle border if on polygon.

edit:

as commented robert longson, there no problem @ in firefox. however, in chrome problem described, , in ie svg polygon not responding hover.

so question chrome remains - in chrome. how know if bug should report, or if designed behavioral difference?

try experimenting pointer-events attribute.

https://developer.mozilla.org/en-us/docs/web/svg/attribute/pointer-events


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -