Re: [css3-regions] Event handling on regions

On 3/27/13 7:36 AM, "Daniel Glazman"
<daniel.glazman@disruptive-innovations.com> wrote:

>On 22/03/13 00:28, Alan Stearns wrote:
>
>> Option 4:
>>
>> Add a new 'display-tree' value to the proposed 'pointer-events' property
>> [1] (or add a new property for this value). The capture phase remains
>> unchanged. The bubble phase remains unchanged *unless* the target node's
>> 'pointer-events' property computes to 'display-tree'. In that case, the
>> event bubbles up to the first fragmented node, then to the fragment
>> container (repeating through nested fragmentation contexts).
>>
>> This option satisfies B, E and F. It satisfies A with
>> 'pointer-events:auto' and C and D with 'pointer-events:display-tree'.
>
>I really really like this proposal. The best of both worlds for
>the least intrusive solution. Please note this could help solve
>the loooong standing issue of hovering over a positioned
>element, cause of the first Note in section 6.6.1.2 of Selectors [1].

Hmm. That note does not mention what the preferred solution would be. If
we hover over an absolutely positioned element and expect the hover
styling to propagate to the display boxes below the element, then it's no
longer necessarily following the display tree. So for this suggestion to
work with both positioned elements and fragment containers, I think this
might be better:

Add a new 'display-order' value to the 'pointer-events' property. If a
node's 'pointer-events' property computes to 'display-order' then event
and hover propagation bubbles through the targets for each box underneath
the pointer position in front-to-back order.

One way of thinking about this would be to consider the target node as
having pointer-events:none - what node would then get the event? That's
the next step in the propagation chain. Now consider that node to have
pointer-events:none to determine the next step, and so on.

And we could define pointer-events:auto as computing to
pointer-events:display-order if the node is in a named flow.

>
>We still have an issue with non-DOMelements used as regions and
>how to attach event handlers to them, though.

Yes, but if and when non-nodes are proper event targets, they could be
inserted into this propagation path.

Thanks,

Alan

Received on Friday, 29 March 2013 01:12:09 UTC