RE: click and contextmenu events

On Tue, Feb 26, 2013 at 7:27 AM, Rick Byers <rbyers@google.com> wrote:
>
> On Sat, Feb 23, 2013 at 3:22 AM, Jacob Rossi <Jacob.Rossi@microsoft.com> wrote:
>>
>> In IE10, click follows the DOM Events definition, which is that it is dispatched to the nearest common ancestor of the down and up events. This has the positive aspect that you can extend the physical object analogy of touch to UI like buttons:  touching down on the left side then dragging to the right and lifting will still activate it (like a physical button). Generally speaking, we don't see accidental activation when dragging (you used the term "pan", but since we're talking touch-action: none, I'm using "drag" so as not to be confused with scrolling). This is because you often drag over multiple elements, which means the click will go to some arbitrary non-activatable parent element. That said, you're right that there are scenarios where this isn't ideal (consider a canvas-based map where dragging would be over a single element and cause a click). While we don't have immediate plans to change our behavior, I wouldn't put that beyond the realm of possibility. Though I don't see any definition, beyond what's already called for by DOM Events, being in the scope of this group.
>
>
> Thanks Jacob, that makes sense.  I suppose since mouse already behaves this way, scenarios like the map one already need to suppress/ignore a click after drag.  I had forgotten that mouse behaved that way.  Do you think think we should reference the DOM Events definition in the PE spec (even if non-normative), or just leave it as is?  Given all the existing touch event implementations differ here, it seems like an easy source of developer confusion (and potentially UA divergence).

There is a note in Section 8 that references the definition in DOM L3 Events. Is that what you're looking for, or something else?
 https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html#compatibility-mapping-with-mouse-events 

>>
>> Yes, contextmenu is like click (not a compatibility mouse event). Hence why I include it in my proposal to use the PointerEvent object. Probably worth adding contextmenu to the sentence in PE that says click is not a compatibility mouse event.
>
>
> Sound good, thanks.
>
>> -Jacob
>>

Received on Tuesday, 26 February 2013 15:50:19 UTC