W3C home > Mailing lists > Public > public-webevents@w3.org > January to March 2011

Fwd: Re: WebEvents-ISSUE-9: Interaction of touch events and mouse events [Touch Events spec]

From: Matt Brubeck <mbrubeck@mozilla.com>
Date: Wed, 30 Mar 2011 16:37:42 -0700
Message-ID: <4D93BEC6.6050700@mozilla.com>
To: "public-webevents@w3.org" <public-webevents@w3.org>
PPK sent this reply to me off-list; forwarding back to the list with his 
permission.

-------- Original Message --------
Subject: Re: WebEvents-ISSUE-9: Interaction of touch events and mouse 
events [Touch Events spec]
Date: Thu, 31 Mar 2011 00:29:24 +0200
From: Peter-Paul Koch <pp.koch@gmail.com>
To: Matt Brubeck <mbrubeck@mozilla.com>

> There is a related issue on browsers that support both touch and mouse input
> - for example, Firefox 4 on Windows 7 tablets.
>
> On platforms like Windows, the operating system may translate touch input
> into mouse movements.  This means that, instead of one "mousemove" event
> happening after the "touchend" event, mousemove events and touchmove events
> are interleaved.  (Maybe these mouse events should be suppressed if
> preventDefault() is called on one or more of the touch events?)


To be honest I always thought of this Firefox behaviour as an error.
The de-facto standard is the implementation I described earlier. Did
Firefox do this because IE does it on Windows 7 touch?

Another option would be to ignore the mouse events entirely in the
specification. Touch browsers only support them because so many
websites require mouse events to function well, but one could argue
that this is beyond the scope of the spec.

As to the interleaving of touchmove and mousemove, that's very easy to
solve with

document.ontouchmove = function () {
   document.onmousemove = null;
}

Still, I see the point that interleaved touch/mouse events are
somewhat more annoying than just sending a bunch of mouse events once,
when the touch start takes place.

-- 
--------------------------------------------
ppk, mobile platform strategist
http://quirksmode.org/about/
+.31.6.29585782
--------------------------------------------
Received on Wednesday, 30 March 2011 23:38:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 March 2011 23:38:22 GMT