Re: pointer-events="none" and an element's children

Thanks Jonathan,

Robert also explained this as well.

Can the SVG spec be updated to clarify that pointer-events="none" only
means the element can not be the target of an event rather than the
(to me) vague term of "receive of an event"?

Regards,
Jeff

On 2/21/08, Jonathan Watt <jwatt@jwatt.org> wrote:
>
>  Jeff Schiller wrote:
>  > Question was raised whether if an element has pointer-events="none"
>  > and one of its children overrides pointer-events="all", can that child
>  > recevie the pointer event?
>
>
> Yes.
>
>
>  > Please sse discussion here
>  > https://bugzilla.mozilla.org/show_bug.cgi?id=410820#c4
>  >
>  > Seems like if the parent element can't receive a pointer event, that
>  > means its children automatically do not because of the capture phase.
>  > Can the SVG WG clarify?  Can clarifications be added to the spec?
>
>
> It's nothing to do with "capture phase", it's to do with CSS inheritance. The
>  'pointer-events' property is inherited, and therefore if a parent has
>  pointer-events="none" the children will inherit this value unless they override it.
>
>  Note that pointer-events only helps decide if an element is the _target_ of an
>  event, and therefore which element an event is targeted at. It does not stop
>  handlers on an element from being triggered if an event has been dispatched to
>  one of that element's children (because the child overrode pointer-events).
>
>
>  Jonathan
>
>

Received on Thursday, 21 February 2008 15:25:21 UTC