Last Comment Bug 624833 - Mozilla should copy iOS's touch event model instead of making up its own
: Mozilla should copy iOS's touch event model instead of making up its own
Status: RESOLVED FIXED
: compat, mobile
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: unspecified
: All All
: -- enhancement with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-11 13:03 PST by Morel Xavier
Modified: 2012-03-06 13:21 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Morel Xavier 2011-01-11 13:03:51 PST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-gb) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
Build Identifier: 

Experimental support for touch events was added to Gecko 2.0 [0] [1]

Sadly, that support was not just done from scratch the whole API was defined from scratch as well, even though multitouch DOM events have been under development since 2007 (the release of the original iphone) and is spreading to the mobile world. The iOS touch events are well-designed and already implemented by the leading touch-based browsing platforms (iOS and Android).

Peter Paul Koch has already done quite a lot of thinking and testing on the subject [2] [3] [4], I believe going off to create a completely divergent API is doing a detriment to the web as a whole unless there are huge advantages to Mozilla's API which solve significant problems in the iOS API.

Further reading: Handling Events in iOS [5] and Handling Multi-Touch Events in iOS sub-document [6], MultiTouch events handling guide for iOS [7]

[0] https://developer.mozilla.org/en/DOM/Touch_events
[1] http://felipe.wordpress.com/2010/08/11/multitouch-in-firefox4/
[2] http://www.quirksmode.org/mobile/tableTouch.html
[3] http://www.quirksmode.org/mobile/advisoryTouch.html
[4] http://www.quirksmode.org/blog/archives/2010/02/the_touch_actio.html
[5] http://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
[6] http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html%23//apple_ref/doc/uid/TP40006511-SW22
[7] http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/MultitouchEvents/MultitouchEvents.html

Reproducible: Always
Comment 1 Boris Zbarsky [:bz] 2011-01-11 15:59:28 PST
Felipe?
Comment 2 Olli Pettay [:smaug] (vacation Aug 25-28) 2011-01-11 16:12:44 PST
Touch events will be specified by W3C in Web Events WG http://www.w3.org/2010/webevents/

Apple's touch events do have some problems, and it is possible
that W3C touch events won't be like those.
(At the moment Apple is not a member of Web Events WG)
Comment 3 Olli Pettay [:smaug] (vacation Aug 25-28) 2011-01-11 16:14:23 PST
(In reply to comment #2)
> and it is possible
> that W3C touch events won't be like those.
I could still clarify that the working group just started, so there isn't even 
any draft for touch events yet.
Comment 4 Morel Xavier 2011-01-12 00:35:23 PST
(In reply to comment #2)
> Apple's touch events do have some problems, and it is possible
> that W3C touch events won't be like those.

That is interesting, would you have resources on the subject so I can get some knowledge on the issue(s) these events have?
Comment 5 Morel Xavier 2011-02-02 12:06:44 PST
(In reply to comment #3)
> (In reply to comment #2)
> > and it is possible
> > that W3C touch events won't be like those.
> I could still clarify that the working group just started, so there isn't even 
> any draft for touch events yet.

Update on this: the first draft was released a few days ago[0] and is *very* strongly inspired by Webkit's (its was the webkit *implementation*).

See also: PPK's comments on the initial draft[1] and the spec editor's followup[2].

Note also from [2] that Mozilla's Matt Brubeck is a co-author of the spec, it might be a good idea to get in touch with him for Mozilla's touch event model implementation.

[0] http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html
[1] http://www.quirksmode.org/blog/archives/2011/01/w3c_touch_event.html
[2] http://schepers.cc/getintouch
Comment 6 Olli Pettay [:smaug] (vacation Aug 25-28) 2011-02-02 13:39:30 PST
(In reply to comment #5)
> Update on this: the first draft was released a few days ago[0] and is *very*
> strongly inspired by Webkit's (its was the webkit *implementation*).
The first editor's draft was released few days ago. That doesn't mean 100% sure 
that the becoming recommendation will look like that. It is likely, but not 
sure.

> See also: PPK's comments on the initial draft[1]
Well, there are many other comments in the mailing list. I don't
see any reason to pick up just one comment ;)


> Note also from [2] that Mozilla's Matt Brubeck is a co-author of the spec, it
> might be a good idea to get in touch with him for Mozilla's touch event model
> implementation.
Matt sure should know what we have implemented. AFAIK, so far only Doug
has actually edited the spec. The work did just start, so atm the draft
is still very unstable

( And btw, I'm also a member of Web Events working group :) )
Comment 7 Matt Brubeck (:mbrubeck) 2011-02-02 13:59:18 PST
(In reply to comment #5)
> Note also from [2] that Mozilla's Matt Brubeck is a co-author of the spec, it
> might be a good idea to get in touch with him for Mozilla's touch event model
> implementation.

I have volunteered to help edit the spec, but I have not contributed to the current Editor's Draft.  I had not even seen any version of the spec before Doug Schepers unveiled his Editor's Draft on the webevents-public list last week [1].

We'll be following the spec closely, and I hope to have some prototype implementations using Gecko well before the specification is finalized.

1. http://www.w3.org/2011/01/25-webevents-minutes.html
Comment 8 Morel Xavier 2011-02-02 14:10:01 PST
(In reply to comment #7)
> (In reply to comment #5)
> > Note also from [2] that Mozilla's Matt Brubeck is a co-author of the spec, it
> > might be a good idea to get in touch with him for Mozilla's touch event model
> > implementation.
> 
> I have volunteered to help edit the spec, but I have not contributed to the
> current Editor's Draft.  I had not even seen any version of the spec before
> Doug Schepers unveiled his Editor's Draft on the webevents-public list last
> week [1].
> 
> We'll be following the spec closely, and I hope to have some prototype
> implementations using Gecko well before the specification is finalized.
> 
> 1. http://www.w3.org/2011/01/25-webevents-minutes.html

Noted, I am sorry to have misconstrued your involvement in the spec and I hope you can accept my apologies for it (I don't think I can amend my previous comment so...)
Comment 9 Wesley Johnston (:wesj) 2012-03-06 13:21:13 PST
This was fixed in bug 603008. Mozilla implements the W3C standard spec for touchevents.

Note You need to log in before you can comment on or make changes to this bug.