[whatwg] Hit regions and events
Robert O'Callahan
robert at ocallahan.org
Wed Mar 5 02:27:27 PST 2014
On Wed, Mar 5, 2014 at 5:11 PM, Rik Cabanier <cabanier at gmail.com> wrote:
> On Tue, Mar 4, 2014 at 6:51 PM, Robert O'Callahan <robert at ocallahan.org
> >wrote:
> > The question remains: what should happen in Rik's example? More
> generally,
> > is this event rerouting supposed to be able to trigger browser default
> > event handling behavior, or only DOM event dispatch?
>
> The spec implies that default event handling is supposed to take place. ie:
>
> With a control, they can make routing events to DOM elements automatic,
> allowing e.g. clicks on a canvas to automatically submit a form via a
> button element.
>
>
> Likewise, if the region is backed by "an a element that represents a
> hyperlink", clicking on that region should navigate you to that link.
> I don't really understand why that would make the implementation more
> difficult though. Wouldn't we get this for free by retargeting the event?
>
The problem is that if these retargeted events can trigger default browser
behavior, the browser has to be able to compute the position of the event
relative to the new target DOM node, and it's not clear how to do that.
Rob
--
Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa
stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr,
'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp
waanndt wyeonut thoo mken.o w
More information about the whatwg
mailing list