W3C home > Mailing lists > Public > public-webevents@w3.org > April to June 2011

Re: preventDefault research

From: Arthur Barstow <art.barstow@nokia.com>
Date: Thu, 05 May 2011 08:40:43 -0400
Message-ID: <4DC29ACB.1050506@nokia.com>
To: ext Andrew Grieve <agrieve@google.com>, Matt Brubeck <mbrubeck@mozilla.com>, "public-webevents@w3.org" <public-webevents@w3.org>
Andrew provided some feedback for Matt. What do others think?

I'm wondering how much prescriptive text we need here versus information 

On Apr/26/2011 9:58 PM, ext Andrew Grieve wrote:
> On Tue, Apr 26, 2011 at 7:39 PM, Matt Brubeck <mbrubeck@mozilla.com 
> <mailto:mbrubeck@mozilla.com>> wrote:
>     I'm doing some of my own research on preventDefault behavior for
>     touch events, because we are busy implementing this in Firefox.
>      Here's a test page that others might find useful:
>     http://limpet.net/w3/touchevents/preventDefault.html
>     Safari, Android WebKit, and Opera Mobile 11 all display the
>     following behaviors:
>     1) preventDefault on the touchstart event prevents scrolling and
>     mouseup/mousedown/click events.
>     2) preventDefault on the touchmove event prevents scrolling.
> I can be a bit more exact for Android/iOS:
> I'm fairly sure that preventDefault only prevents scrolling on android 
> if you call it on the very first touchmove event.
> On iOS, if you call preventDefault on a single touchmove event at any 
> point before scroll mode is entered then scrolling will be disabled 
> for the duration of the touch (not necessarily the very first touchmove).
> Also note that if one finger has disabled page scrolling through a 
> preventDefault() on touchstart / touchmove, then a second touch that 
> occurs at the same time will not be able to scroll the page (at least 
> on iOS).
>     3) preventDefault on the touchend event does NOT prevent scrolling
>     or mouse events.
> I believe that it will prevent a click from firing on the latest iOS 
> and on the Playbook.
Received on Thursday, 5 May 2011 12:41:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:09:33 UTC