- From: Iván Sánchez Ortega via GitHub <sysbot+gh@w3.org>
- Date: Thu, 19 Jan 2017 15:34:17 +0000
- To: public-pointer-events@w3.org
IvanSanchez has just created a new issue for https://github.com/w3c/pointerevents: == Behaviour of dblclicks is not specified == I'm a maintainer of Leaflet, and after fixing bug https://github.com/Leaflet/Leaflet/issues/5180 , I must complain about `dblclick`s in browsers which support `PointerEvent`s. As far as I'm aware, the current state of affairs when it comes to firing `dblclick` events is: | Browser | Fires `dblblick` when double-clicking with a mouse | Fires `dblclick` when double-tapping a touchscreen | Supports `PointerEvent`s | | -------------- | ------------- | ------------- | ------------- | | IE10, IE11 | Yes | Yes | Yes | | Edge | Yes | No | Yes | | Firefox (v50) | Yes | No | No | | Chrome (v<55) | Yes | No | No | | Chrome (v>=55) | Yes | Yes | Yes | | Safari | Yes | No | No | This makes polyfilling `dblclick` behaviour a hard issue (and one that requires browser sniffing which, as we know, is a Bad Idea™). As far as I'm aware, Leaflet is the only library that polyfills `dblclick`s for `PointerEvent`s; [https://github.com/jquery/PEP/](jquery-PEP) does not. Part of the fault is attributable to the current redaction of the `dblclick` event in https://www.w3.org/TR/DOM-Level-3-Events/#event-type-dblclick (emphasis mine): > A user agent MUST dispatch this event when the primary **button** of a pointing device is clicked twice over an element. The **definition of a double click depends on the environment configuration**, except that the event target MUST be the same between mousedown, mouseup, and dblclick. That was written way before `TouchEvent`s were defined or implemented, so browser vendors can either stick to the wording (like Edge) or to the spirit (like Chrome, IE10/IE11). I hereby request that UAs should behave **consistently** about firing `dblclick`s, and that this should be specified and documented. Either fire `dblclick`s only with a mouse, or fire `dblclick`s with any pointer type (I'd slightly prefer the later). This probably depends on https://github.com/w3c/pointerevents/issues/100 , but is a different issue. Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/171 using your GitHub account
Received on Thursday, 19 January 2017 15:34:23 UTC