[whatwg] Hit regions and events

Rik Cabanier cabanier at gmail.com
Tue Mar 4 20:11:52 PST 2014

On Tue, Mar 4, 2014 at 6:51 PM, Robert O'Callahan <robert at ocallahan.org>wrote:

> On Wed, Mar 5, 2014 at 12:53 PM, Ian Hickson <ian at hixie.ch> wrote:
>> On Fri, 28 Feb 2014, Rik Cabanier wrote:
>> > For instance, if the fallback is an edit control and the user
>> > drag-selects some text on the canvas, is it expected that this text is
>> > also selected in the edit control?
>> You can't validly include a text field in canvas fallback precisely
>> because of this kind of thing. See:
>>    http://whatwg.org/html#best-practices
> 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?

More information about the whatwg mailing list