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

Re: preventDefault research

From: Andrew Grieve <agrieve@google.com>
Date: Wed, 27 Apr 2011 15:25:26 -0400
Message-ID: <BANLkTimaocCSEVri-j0cjt8jJRF_mt-NVw@mail.gmail.com>
To: Matt Brubeck <mbrubeck@mozilla.com>
Cc: "public-webevents@w3.org" <public-webevents@w3.org>
On Wed, Apr 27, 2011 at 12:53 PM, Matt Brubeck <mbrubeck@mozilla.com> wrote:

> 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:
> http://dvcs.w3.org/hg/webevents/rev/22e39e76033e

Another idea here is to also specify that no tap highlight should be drawn,
since the click won't be fired.


>
>
> 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 19:26:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 April 2011 19:26:11 GMT