Re: [w3c/touch-events] note about avoiding conditional "touch OR mouse/keyboard" event handling (#72)

> @@ -960,7 +960,26 @@ <h3 id="event-touchcancel">The <dfn class="event"><code>touchcancel</code></dfn>
>        </ol>           
>        </section>
>  
> -
> +      <section class="note">
> +      <p>Even if a user agent supports Touch Events, this does not necessarily mean that a touchscreen is the only input mechanism available to users. Particularly in the case of touch-enabled laptops, or traditional "touch only" devices (such as phones and tablets) with paired external input devices, users may use the touchscreen in conjunction with a trackpad, mouse or keyboard. For this reason, developers should avoid binding event listeners with "either touch or mouse/keyboard" conditional code, as this results in sites/application that become touch-exclusive, preventing users from being able to use any other input mechanism.</p>
> +<pre class="example"><code>
> +// conditional "touch OR mouse/keyboard" event binding

Nit: add a comment like "WARNING: Don't do this, many devices support both touch and mouse".

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/touch-events/pull/72/files/9faf80b27d03bdc65847bfb82bc851ebc203f3e6#r73158206

Received on Tuesday, 2 August 2016 13:53:00 UTC