[whatwg] Hit regions and events

Ian Hickson ian at hixie.ch
Tue Mar 4 20:10:54 PST 2014


On Tue, 4 Mar 2014, Rik Cabanier wrote:
> On Tue, Mar 4, 2014 at 6:07 PM, Ian Hickson <ian at hixie.ch> wrote:
> > On Tue, 4 Mar 2014, Rik Cabanier wrote:
> > >
> > > Ok. It seems odd that the events are following the dom of the 
> > > fallback elements and not of the hit regions.
> >
> > It's what events normally do. I guess we could make this more 
> > elaborate, but it's not clear what the use case is. Can you elaborate?
> 
> The weirdness is that the pseudo hit region DOM can be different from the
> fallback dom.
> So, if b is a child of a, but the fallback element for b is not a child of
> the fallback element for a, you won't get the event on a if you hit b.

It's not really a "fallback DOM". The events don't bubble through the 
regions if they're not attached to a control. The "parent" chain is just a 
convenient way of managing related regions.


> > I couldn't really see a sane way to do it (e.g. consider if two 
> > touches change at the same time, but they started on different regions 
> > on the same canvas). Do you have a proposal for how to make touch 
> > event rerouting work for canvas regions?
> 
> The touch class [1] could be updated with a region string.
> As you move your fingers, the id would reflect what regions your fingers
> are on.

So what would you do in the case where you start two touches on different 
regions, then move them at the same time to two other different regions at 
the same time? What would you put in the touchmove event's object?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list