Re: Phasing out mouse compatibility events on tap?

On Fri, Jan 16, 2015 at 12:22 PM, Patrick H. Lauke <redux@splintered.co.uk>
wrote:

> On 16/01/2015 16:57, PhistucK wrote:
>
>> Most websites do not explicitly need touch events, but only mouse events
>> (with the compatibility mouse events). So in the same vein, perhaps
>> document.disableTouchEvents should be added.
>>
>
> And why exactly? If your site does not register touch event handlers, then
> it makes no difference/does not need to be suppressed.


+1.

If the problem was simply "we can make things faster by never firing mouse
events" then the "API" would be "don't listen for mouse events".  But it's
more complex than that - the site WANTS mouse events, but only for actual
mouse input.  So they need a way to selectively enable them.

Another option would be to somehow extend the addEventListener API to
somehow indicate what level of compatibility you want.  Eg. "listen for
mousedown events which aren't firedFrom('TouchEvent')".

-- 
> Patrick H. Lauke
>
> www.splintered.co.uk | https://github.com/patrickhlauke
> http://flickr.com/photos/redux/ | http://redux.deviantart.com
> twitter: @patrick_h_lauke | skype: patrick_h_lauke
>

Received on Friday, 16 January 2015 17:27:18 UTC