Re: Phasing out mouse compatibility events on tap?

On Fri, Jan 16, 2015 at 12:28 PM, PhistucK <phistuck@gmail.com> wrote:

> MouseEvent.prototype.simulated = true should be sufficient for this
> problem.
>

It is not.  See
https://docs.google.com/a/chromium.org/document/d/1-ZUtS3knhJP4RbWC74fUZbNp6cbytG6Wen7hewdCtdo/edit#
and
other threads on public-touchevents for discussion.  Additionally we can't
achieve the performance benefits by simply filtering out the events in JS
(eg. we still have to do hit-tests to get them to JS in the first place).


> ☆*Phistu*
> On Fri, Jan 16, 2015 at 7:26 PM, Rick Byers <rbyers@chromium.org> wrote:
>
>> 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:32:17 UTC