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

Re: preventDefault research

From: Matt Brubeck <mbrubeck@mozilla.com>
Date: Wed, 27 Apr 2011 09:53:55 -0700
Message-ID: <4DB84A23.70108@mozilla.com>
To: Andrew Grieve <agrieve@google.com>
CC: "public-webevents@w3.org" <public-webevents@w3.org>
On 04/26/2011 06:58 PM, Andrew Grieve wrote:
> 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.

Thanks for the extra details!

I edited the spec to specify that preventDefault on touchstart events 
should prevent mouse events:

All other default actions are currently undefined.  I'm open to 
proposals to specify more default behavior (especially panning), but I 
also think it would be okay to leave some of them 
implementation-defined, at least for now.

> 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).

Interesting - I think this does not match the behavior I got for Safari 
on an old version of iOS.  (I don't have any hardware that runs the 
current version.)

>     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.

Oh yes, I should have mentioned that I was testing Android 2.2 and Opera 
Mobile 11 on Samsung Galaxy Tab and HTC T-Mobile G2, and Safari 4 for 
iOS 3.1 on first-generation iPod touch.
Received on Wednesday, 27 April 2011 16:54:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:53 UTC