author | Art Barstow <art.barstow@nokia.com> |
Tue, 15 Jan 2013 13:14:29 -0500 | |
branch | v1 |
changeset 169 | 0cc0210f86b0 |
parent 168 | 3c071d7f7be6 |
child 170 | 15689c78573b |
permissions | -rw-r--r-- |
4 | 1 |
<!DOCTYPE html> |
74
b1920268c222
Add language and viewport metadata.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
73
diff
changeset
|
2 |
<html lang="en"> |
4 | 3 |
<head> |
101
2d830a098494
Initial checkin for Touch Events version 1
Matt Brubeck <mbrubeck@mozilla.com>
parents:
100
diff
changeset
|
4 |
<title>Touch Events version 1</title> |
4 | 5 |
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/> |
74
b1920268c222
Add language and viewport metadata.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
73
diff
changeset
|
6 |
<meta name="viewport" content="width=device-width"> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
7 |
<!-- |
4 | 8 |
=== NOTA BENE === |
9 |
For the three scripts below, if your spec resides on dev.w3 you can check them |
|
10 |
out in the same tree and use relative links so that they'll work offline, |
|
11 |
--> |
|
169
0cc0210f86b0
Update location of respec per recommendation from Marcos
Art Barstow <art.barstow@nokia.com>
parents:
168
diff
changeset
|
12 |
<script src='http://www.w3.org/Tools/respec/respec-w3c-common' class='remove'></script> |
4 | 13 |
<script class='remove'> |
14 |
var respecConfig = { |
|
15 |
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED. |
|
168
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
16 |
specStatus: "LCWD", |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
17 |
|
4 | 18 |
// the specification's short name, as in http://www.w3.org/TR/short-name/ |
19 |
shortName: "touch-events", |
|
20 |
||
21 |
// if your specification has a subtitle that goes below the main |
|
22 |
// formal title, define it here |
|
23 |
// subtitle : "an excellent document", |
|
24 |
||
25 |
// if you wish the publication date to be other than today, set this |
|
168
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
26 |
publishDate: "2013-01-24", |
4 | 27 |
|
28 |
// if the specification's copyright date is a range of years, specify |
|
29 |
// the start date here: |
|
30 |
// copyrightStart: "2005" |
|
31 |
||
32 |
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date |
|
33 |
// and its maturity status |
|
168
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
34 |
previousPublishDate: "2011-12-15", |
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
35 |
previousMaturity: "CR", |
4 | 36 |
|
37 |
// if there a publicly available Editor's Draft, this is the link |
|
107
923f5ba58a22
v1 spec should link to v1 editors' draft.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
106
diff
changeset
|
38 |
edDraftURI: "http://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html", |
4 | 39 |
|
40 |
// if this is a LCWD, uncomment and set the end of its review period |
|
168
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
41 |
lcEnd: "2013-02-14", |
3c071d7f7be6
Update boilerplate for LC#2 on 24-Jan-2013
Art Barstow <art.barstow@nokia.com>
parents:
144
diff
changeset
|
42 |
//crEnd: "2012-03-15", |
4 | 43 |
|
44 |
// if you want to have extra CSS, append them to this list |
|
45 |
// it is recommended that the respec.css stylesheet be kept |
|
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
46 |
extraCSS: ["http://www.w3.org/StyleSheets/TR/W3C-TR.css", "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"], |
4 | 47 |
|
48 |
// editors, add as many as you like |
|
49 |
// only "name" is required |
|
50 |
editors: [ |
|
51 |
{ name: "Doug Schepers", url: "http://schepers.cc/", |
|
52 |
company: "W3C", companyURL: "http://w3.org/" }, |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
53 |
{ name: "Sangwhan Moon", |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
54 |
company: "Opera Software ASA", companyURL: "http://www.opera.com/" }, |
97
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
55 |
{ name: "Matt Brubeck", url: "http://limpet.net/mbrubeck/", |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
56 |
company: "Mozilla", companyURL: "http://www.mozilla.org/" }, |
4 | 57 |
], |
58 |
||
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
59 |
// authors, add as many as you like. |
4 | 60 |
// This is optional, uncomment if you have authors as well as editors. |
61 |
// only "name" is required. Same format as editors. |
|
62 |
||
63 |
//authors: [ |
|
64 |
// { name: "Your Name", url: "http://example.org/", |
|
65 |
// company: "Your Company", companyURL: "http://example.com/" }, |
|
66 |
//], |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
67 |
|
4 | 68 |
// name of the WG |
69 |
wg: "Web Events Working Group", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
70 |
|
4 | 71 |
// URI of the public WG page |
72 |
wgURI: "http://www.w3.org/2010/webevents/", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
73 |
|
4 | 74 |
// name (with the @w3c.org) of the public mailing to which comments are due |
75 |
wgPublicList: "public-webevents", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
76 |
|
4 | 77 |
// URI of the patent status for this WG, for Rec-track documents |
78 |
// !!!! IMPORTANT !!!! |
|
79 |
// This is important for Rec-track documents, do not copy a patent URI from a random |
|
80 |
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood |
|
81 |
// Team Contact. |
|
82 |
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/45559/status", |
|
83 |
}; |
|
84 |
</script> |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
85 |
|
66
9555f231576e
Fix another validation error.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
61
diff
changeset
|
86 |
<style type="text/css"> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
87 |
.event { |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
88 |
font-family: monospace; |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
89 |
color: #459900; |
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
90 |
} |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
91 |
|
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
92 |
pre.idl { |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
93 |
white-space: pre-wrap; |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
94 |
} |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
95 |
</style> |
4 | 96 |
</head> |
97 |
<body> |
|
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
98 |
<section id='sotd'> |
143
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
99 |
This specification is the 15 December 2011 Candidate Recommendation. |
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
100 |
Comments for the <a href="http://www.w3.org/TR/2011/WD-touch-events-20110913/">13 September 2011 Last Call Working Draft</a> |
143
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
101 |
are tracked in the <a href="http://www.w3.org/2010/webevents/wiki/TouchEvents-LCWD-13-Sep-2011">comment tracking document</a> |
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
102 |
and comments for the <a href="http://www.w3.org/TR/2011/WD-touch-events-20111027/">27 October 2011 Last Call Working Draft</a> |
144 | 103 |
are tracked in a separate <a href="http://www.w3.org/2010/webevents/wiki/TouchEvents-LCWD-27-Oct-2011">comment tracking document</a>. |
143
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
104 |
|
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
105 |
During the Candidate Recommendation period, the WG will complete its |
144 | 106 |
<a href="http://dvcs.w3.org/hg/webevents/">test suite</a> and two or more independent implementations |
143
5bbc6e212756
Updates for publishing as a Candidate Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
142
diff
changeset
|
107 |
must pass each test before the specification exits Candidate Recommendation. |
144 | 108 |
The group will also create an Implementation Report. |
109 |
||
110 |
<p>Implementors should note that |
|
111 |
<a href="http://www.w3.org/2004/01/pp-impl/45559/status">patent disclosures</a> |
|
112 |
have been made related to this specification. |
|
113 |
</p> |
|
114 |
||
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
115 |
</section> |
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
116 |
|
4 | 117 |
<section id='abstract'> |
103 | 118 |
The Touch Events specification defines a set of low-level events that |
85 | 119 |
represent one or more points of contact with a touch-sensitive surface, |
120 |
and changes of those points with respect to the surface and any DOM |
|
121 |
elements displayed upon it (e.g. for touch screens) or associated with it |
|
122 |
(e.g. for drawing tablets without displays). It also addresses |
|
123 |
pen-tablet devices, such as drawing tablets, with consideration toward |
|
124 |
stylus capabilities. |
|
4 | 125 |
</section> |
5 | 126 |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
127 |
<section id='introduction' class='informative'> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
128 |
<h2>Introduction</h2> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
129 |
|
85 | 130 |
<p> |
131 |
User Agents that run on terminals which provide touch input to use web |
|
87 | 132 |
applications typically use interpreted mouse events to allow users |
85 | 133 |
to access interactive web applications. However, these interpreted |
134 |
events, being normalized data based on the physical touch input, tend |
|
87 | 135 |
to have limitations on delivering the intended user experience. |
85 | 136 |
Additionally, it is not possible to handle concurrent input regardless |
87 | 137 |
of device capability, due to constraints of mouse events: both |
138 |
system level limitations and legacy compatibility. |
|
85 | 139 |
</p> |
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
140 |
|
85 | 141 |
<p> |
142 |
Meanwhile, native applications are capable of handling both cases with |
|
143 |
the provided system APIs. |
|
144 |
</p> |
|
145 |
||
146 |
<p> |
|
147 |
The Touch Events specification provides a solution to this problem by |
|
86 | 148 |
specifying interfaces to allow web applications to directly handle touch |
85 | 149 |
events, and multiple touch points for capable devices. |
150 |
</p> |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
151 |
</section> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
152 |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
153 |
<section id='conformance'> |
85 | 154 |
<p> |
155 |
This specification defines conformance criteria that apply to a single |
|
156 |
product: the <dfn id="dfn-user-agent">user agent</dfn> that implements |
|
157 |
the interfaces that it contains. |
|
158 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
159 |
|
85 | 160 |
<p> |
161 |
Implementations that use ECMAScript to implement the APIs defined in |
|
162 |
this specification must implement them in a manner consistent with the |
|
163 |
ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]] as |
|
164 |
this specification uses that specification and terminology. |
|
165 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
166 |
|
85 | 167 |
<p> |
168 |
A conforming implementation is required to implement all fields |
|
169 |
defined in this specification. |
|
170 |
</p> |
|
28
4cbcb68446b5
First draft of a Conformance section based on the DAP WG's Contacts API:
Art Barstow <art.barstow@nokia.com>
parents:
27
diff
changeset
|
171 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
172 |
|
4 | 173 |
<section> |
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
174 |
<h2><a>Touch</a> Interface</h2> |
85 | 175 |
<p> |
139
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
176 |
This interface describes an individual <a>touch point</a> for a touch |
106
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
177 |
event. <a>Touch</a> objects are immutable; after one is created, its |
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
178 |
attributes must not change. |
85 | 179 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
180 |
|
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
181 |
<dl title='interface Touch' class='idl'> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
182 |
<dt>readonly attribute long identifier</dt> |
5 | 183 |
<dd> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
184 |
An identification number for each <a>touch point</a>. |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
185 |
|
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
186 |
When a touch point becomes active, it must be assigned an |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
187 |
<a>identifier</a> that is distinct from any other <a>active touch |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
188 |
point</a>. While the touch point remains active, all events that |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
189 |
refer to it must assign it the same <a>identifier</a>. |
5 | 190 |
</dd> |
4 | 191 |
|
139
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
192 |
<dt>readonly attribute EventTarget target</dt> |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
193 |
<dd> |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
194 |
The <a>Element</a> on which the <a>touch point</a> started when it |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
195 |
was first placed on the surface, even if the <a>touch point</a> has |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
196 |
since moved outside the interactive area of that element. |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
197 |
</dd> |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
198 |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
199 |
<dt>readonly attribute long screenX</dt> |
5 | 200 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
201 |
The horizontal coordinate of point relative to the screen in pixels |
5 | 202 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
203 |
<dt>readonly attribute long screenY</dt> |
5 | 204 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
205 |
The vertical coordinate of point relative to the screen in pixels |
5 | 206 |
</dd> |
4 | 207 |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
208 |
<dt>readonly attribute long clientX</dt> |
5 | 209 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
210 |
The horizontal coordinate of point relative to the viewport in pixels, |
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
211 |
excluding any scroll offset |
5 | 212 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
213 |
<dt>readonly attribute long clientY</dt> |
5 | 214 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
215 |
The vertical coordinate of point relative to the viewport in pixels, |
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
216 |
excluding any scroll offset |
5 | 217 |
</dd> |
218 |
||
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
219 |
<dt>readonly attribute long pageX</dt> |
5 | 220 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
221 |
The horizontal coordinate of point relative to the viewport in pixels, |
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
222 |
including any scroll offset |
5 | 223 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
224 |
<dt>readonly attribute long pageY</dt> |
5 | 225 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
226 |
The vertical coordinate of point relative to the viewport in pixels, |
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
227 |
including any scroll offset |
5 | 228 |
</dd> |
229 |
</dl> |
|
230 |
</section> |
|
231 |
||
232 |
<section> |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
233 |
<h2><a>TouchList</a> Interface</h2> |
85 | 234 |
<p> |
235 |
This interface defines a list of individual points of contact for a |
|
106
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
236 |
touch event. <a>TouchList</a> objects are immutable; after one is |
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
237 |
created, its contents must not change. |
85 | 238 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
239 |
|
5 | 240 |
<dl title='interface TouchList' class='idl'> |
241 |
<dt>readonly attribute unsigned long length</dt> |
|
242 |
<dd> |
|
47
926af59e3515
Fix typos in previous commit
Matt Brubeck <mbrubeck@mozilla.com>
parents:
46
diff
changeset
|
243 |
returns the number of <a>Touch</a>es in the list |
5 | 244 |
</dd> |
103 | 245 |
<dt>getter <a>Touch</a> item (in unsigned long index)</dt> |
5 | 246 |
<dd> |
103 | 247 |
returns the <a>Touch</a> at the specified index in the list |
5 | 248 |
</dd> |
103 | 249 |
<dt><a>Touch</a> identifiedTouch (in long identifier)</dt> |
5 | 250 |
<dd> |
103 | 251 |
returns the first <a>Touch</a> item in the list whose <a>identifier</a> property matches the specified identifier |
5 | 252 |
</dd> |
253 |
</dl> |
|
254 |
</section> |
|
255 |
||
256 |
<section> |
|
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
257 |
<h2><a>TouchEvent</a> Interface</h2> |
85 | 258 |
<p> |
259 |
This interface defines the <a>touchstart</a>, <a>touchend</a>, |
|
101
2d830a098494
Initial checkin for Touch Events version 1
Matt Brubeck <mbrubeck@mozilla.com>
parents:
100
diff
changeset
|
260 |
<a>touchmove</a>, and <a>touchcancel</a> event types. |
106
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
261 |
<a>TouchEvent</a> objects are immutable; after one is created and |
ede041c4799e
Issue-16: Specify that Touch/TouchList/TouchEvent objects are immutable.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
104
diff
changeset
|
262 |
initialized, its attributes must not change. |
85 | 263 |
</p> |
5 | 264 |
|
6
83ce29dff849
changed cx/cy to rx/ry, defined units for both; added key modifier attributes; changed identifier to float
shepazu <schepers@w3.org>
parents:
5
diff
changeset
|
265 |
<dl title='interface TouchEvent : UIEvent' class='idl'> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
266 |
<dt>readonly attribute <a>TouchList</a> touches</dt> |
4 | 267 |
<dd> |
85 | 268 |
a list of <a>Touch</a>es for every point of contact currently |
99 | 269 |
touching the surface. |
4 | 270 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
271 |
<dt>readonly attribute <a>TouchList</a> targetTouches</dt> |
4 | 272 |
<dd> |
96
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
273 |
a list of <a>Touch</a>es for every point of contact that is touching |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
274 |
the surface <em>and</em> started on the element that is the |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
275 |
<a>target</a> of the current event. |
4 | 276 |
</dd> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
277 |
<dt>readonly attribute <a>TouchList</a> changedTouches</dt> |
4 | 278 |
<dd> |
96
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
279 |
<p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
280 |
a list of <a>Touch</a>es for every point of contact which contributed |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
281 |
to the event. |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
282 |
</p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
283 |
<p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
284 |
For the <a>touchstart</a> event this must be a list of the touch |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
285 |
points that just became active with the current event. For the |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
286 |
<a>touchmove</a> event this must be a list of the touch points that |
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
287 |
have moved since the last event. For the <a>touchend</a> and |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
288 |
<a>touchcancel</a> events this must be a list of the touch points |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
289 |
that have just been removed from the surface. |
96
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
290 |
</p> |
4 | 291 |
</dd> |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
292 |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
293 |
<dt>readonly attribute boolean altKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
294 |
<dd> |
85 | 295 |
<code>true</code> if the alt (Alternate) key modifier is activated; |
296 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
297 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
298 |
<dt>readonly attribute boolean metaKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
299 |
<dd> |
85 | 300 |
<code>true</code> if the meta (Meta) key modifier is activated; |
301 |
otherwise <code>false</code>. On some platforms this attribute may |
|
302 |
map to a differently-named key modifier. |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
303 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
304 |
<dt>readonly attribute boolean ctrlKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
305 |
<dd> |
85 | 306 |
<code>true</code> if the ctrl (Control) key modifier is activated; |
307 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
308 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
309 |
<dt>readonly attribute boolean shiftKey</dt> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
310 |
<dd> |
85 | 311 |
<code>true</code> if the shift (Shift) key modifier is activated; |
312 |
otherwise <code>false</code> |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
313 |
</dd> |
4 | 314 |
</dl> |
100
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
315 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
316 |
<section class="informative"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
317 |
<h2>Usage Examples</h2> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
318 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
319 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
320 |
The examples below demonstrate the relations between the different |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
321 |
<a>TouchList</a> members defined in a <a>TouchEvent</a>. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
322 |
</p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
323 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
324 |
<section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
325 |
<h3>touches and targetTouches of a <a>TouchEvent</a></h3> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
326 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
327 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
328 |
This example demonstrates the utility and relations between the |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
329 |
touches and targetTouches members defined in the <a>TouchEvent</a> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
330 |
interface. The following code will generate different output based |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
331 |
on the number of touch points on the touchable element and the document: |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
332 |
</p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
333 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
334 |
<pre class="example"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
335 |
<div id='touchable'> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
336 |
This element is touchable. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
337 |
</div> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
338 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
339 |
document.getElementById('touchable').addEventListener('touchstart', function(ev) { |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
340 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
341 |
if (ev.touches.item(0) == ev.targetTouches.item(0)) |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
342 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
343 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
344 |
* If the first touch on the surface is also targeting the |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
345 |
* "touchable" element, the code below should execute. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
346 |
* Since targetTouches is a subset of touches which covers the |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
347 |
* entire surface, TouchEvent.touches >= TouchEvents.targetTouches |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
348 |
* is always true. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
349 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
350 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
351 |
document.write('Hello Touch Events!'); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
352 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
353 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
354 |
if (ev.touches.length == ev.targetTouches.length) |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
355 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
356 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
357 |
* If all of the active touch points are on the "touchable" |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
358 |
* element, the length properties should be the same. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
359 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
360 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
361 |
document.write('All points are on target element') |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
362 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
363 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
364 |
if (ev.touches.length > 1) |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
365 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
366 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
367 |
* On a single touch input device, there can only be one point |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
368 |
* of contact on the surface, so the following code can only |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
369 |
* execute when the terminal supports multiple touches. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
370 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
371 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
372 |
document.write('Hello Multiple Touch!'); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
373 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
374 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
375 |
}, false); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
376 |
</pre> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
377 |
</section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
378 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
379 |
<section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
380 |
<h3>changedTouches of a <a>TouchEvent</a></h3> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
381 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
382 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
383 |
This example demonstrates the utility of changedTouches and it's relation |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
384 |
with the other <a>TouchList</a> members of the <a>TouchEvent</a> interface. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
385 |
The code is a example which triggers whenever a touch point is removed |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
386 |
from the defined touchable element: |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
387 |
</p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
388 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
389 |
<pre class="example"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
390 |
<div id='touchable'> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
391 |
This element is touchable. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
392 |
</div> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
393 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
394 |
document.getElementById('touchable').addEventListener('touchend', function(ev) { |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
395 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
396 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
397 |
* Example output when three touch points are on the surface, |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
398 |
* two of them being on the "touchable" element and one point |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
399 |
* in the "touchable" element is lifted from the surface: |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
400 |
* |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
401 |
* Touch points removed: 1 |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
402 |
* Touch points left on element: 1 |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
403 |
* Touch points left on document: 2 |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
404 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
405 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
406 |
document.write('Removed: ' + ev.changedTouches.length); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
407 |
document.write('Remaining on element: ' + ev.targetTouches.length); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
408 |
document.write('Remaining on document: ' + ev.touches.length); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
409 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
410 |
}, false); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
411 |
</pre> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
412 |
</section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
413 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
414 |
</section> |
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
415 |
|
126
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
416 |
<section class="informative"> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
417 |
<h2>List of <a>TouchEvent</a> types</h2> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
418 |
|
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
419 |
<p> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
420 |
The following table provides a summary of the types of possible |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
421 |
<a>TouchEvent</a> types defined in this specification. All events |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
422 |
should accomplish the bubbling phase. Some events are not cancelable |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
423 |
(see <a>preventDefault</a>). |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
424 |
</p> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
425 |
|
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
426 |
<!-- |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
427 |
// FIXME: As of the time of writing, respec.js doesn't have support for |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
428 |
// tables like this - we're just piggybacking on a existing class, with |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
429 |
// raw markup as a quick and dirty workaround. |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
430 |
--> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
431 |
|
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
432 |
<table class="parameters" id="table-event-summary"> |
126
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
433 |
<tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
434 |
<th>Event Type</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
435 |
<th>Sync / Async</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
436 |
<th>Bubbling phase</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
437 |
<th>Trusted proximal event target types</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
438 |
<th>DOM interface</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
439 |
<th>Cancelable</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
440 |
<th>Default Action</th> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
441 |
</tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
442 |
<tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
443 |
<td><a>touchstart</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
444 |
<td>Sync</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
445 |
<td>Yes</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
446 |
<td><code>Document, Element</code></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
447 |
<td><a>TouchEvent</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
448 |
<td>Yes</td> |
131
a057d31f3cc6
Change default action for touchstart and touchmove from none to undefined.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
130
diff
changeset
|
449 |
<td>undefined</td> |
126
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
450 |
</tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
451 |
<tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
452 |
<td><a>touchend</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
453 |
<td>Sync</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
454 |
<td>Yes</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
455 |
<td><code>Document, Element</code></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
456 |
<td><a>TouchEvent</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
457 |
<td>Yes</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
458 |
<td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
459 |
Varies: mousemove (If point has been moved), mousedown, |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
460 |
mouseup, click |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
461 |
</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
462 |
</tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
463 |
<tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
464 |
<td><a>touchmove</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
465 |
<td>Sync</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
466 |
<td>Yes</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
467 |
<td><code>Document, Element</code></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
468 |
<td><a>TouchEvent</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
469 |
<td>Yes</td> |
131
a057d31f3cc6
Change default action for touchstart and touchmove from none to undefined.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
130
diff
changeset
|
470 |
<td>undefined</td> |
126
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
471 |
</tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
472 |
<tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
473 |
<td><a>touchcancel</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
474 |
<td>Sync</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
475 |
<td>Yes</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
476 |
<td><code>Document, Element</code></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
477 |
<td><a>TouchEvent</a></td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
478 |
<td>No</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
479 |
<td>none</td> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
480 |
</tr> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
481 |
</table> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
482 |
</section> |
121689c8a8f9
Add a single table describing all TouchEvents. Addresses ACTION-83, as a part of LC-5.
Sangwhan Moon <smoon@opera.com>
parents:
124
diff
changeset
|
483 |
|
5 | 484 |
<section> |
85 | 485 |
<h3 id="event-touchstart">The <dfn class="event">touchstart</dfn> |
486 |
event</h3> |
|
487 |
<p> |
|
488 |
A user agent must dispatch this event type to indicate when the user |
|
489 |
places a <a>touch point</a> on the touch surface. |
|
490 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
491 |
|
85 | 492 |
<p> |
93
29ec4253b862
Issue-6: Events should be dispatched to targets within frames.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
92
diff
changeset
|
493 |
The target of this event must be an <a>Element</a>. If the touch |
29ec4253b862
Issue-6: Events should be dispatched to targets within frames.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
92
diff
changeset
|
494 |
point is within a frame, the event should be dispatched to an element |
29ec4253b862
Issue-6: Events should be dispatched to targets within frames.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
92
diff
changeset
|
495 |
in the <a>child browsing context</a> of that frame. |
85 | 496 |
</p> |
95
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
497 |
|
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
498 |
<p> |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
499 |
If the <a>preventDefault</a> method is called on this event, it |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
500 |
should prevent any default actions caused by any touch events |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
501 |
associated with the same <a>active touch point</a>, including mouse |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
502 |
events or scrolling. |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
503 |
</p> |
5 | 504 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
505 |
|
5 | 506 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
507 |
<h3 id="event-touchend">The <dfn class="event">touchend</dfn> event</h3> |
85 | 508 |
<p> |
509 |
A user agent must dispatch this event type to indicate when the user |
|
510 |
removes a <a>touch point</a> from the touch surface, also including |
|
511 |
cases where the touch point physically leaves the touch surface, such |
|
512 |
as being dragged off of the screen. |
|
513 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
514 |
|
85 | 515 |
<p> |
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
516 |
The <a>target</a> of this event must be the same <a>Element</a> on |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
517 |
which the <a>touch point</a> started when it was first |
85 | 518 |
placed on the surface, even if the <a>touch point</a> has since moved |
519 |
outside the interactive area of the <a>target</a> element. |
|
520 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
521 |
|
85 | 522 |
<p> |
523 |
The <a>touch point</a> or points that were removed must be included |
|
524 |
in the <a>changedTouches</a> attribute of the <a>TouchEvent</a>, and |
|
525 |
must not be included in the <a>touches</a> and <a>targetTouches</a> |
|
526 |
attributes. |
|
527 |
</p> |
|
5 | 528 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
529 |
|
5 | 530 |
<section> |
9
8171bbe11ccc
changed floats to longs; clarified definitions; added editors Moon, Brubeck; tidied ReSpec code; fixed credits; revised touchcancel event
shepazu <schepers@w3.org>
parents:
8
diff
changeset
|
531 |
<h3 id="event-touchmove">The <dfn class="event">touchmove</dfn> event</h3> |
85 | 532 |
<p> |
533 |
A user agent must dispatch this event type to indicate when the user |
|
534 |
moves a <a>touch point</a> along the touch surface. |
|
535 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
536 |
|
85 | 537 |
<p> |
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
538 |
The <a>target</a> of this event must be the same <a>Element</a> on |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
539 |
which the <a>touch point</a> started when it was first |
85 | 540 |
placed on the surface, even if the <a>touch point</a> has since moved |
541 |
outside the interactive area of the <a>target</a> element. |
|
542 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
543 |
|
85 | 544 |
<p> |
545 |
Note that the rate at which the user agent sends <a>touchmove</a> |
|
546 |
events is implementation-defined, and may depend on hardware |
|
547 |
capabilities and other implementation details. |
|
548 |
</p> |
|
95
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
549 |
|
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
550 |
<p> |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
551 |
If the <a>preventDefault</a> method is called on the <em>first</em> |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
552 |
<a>touchmove</a> event of an <a>active touch point</a>, it should |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
553 |
prevent any default action caused by any <a>touchmove</a> event |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
554 |
associated with the same <a>active touch point</a>, such as scrolling. |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
555 |
</p> |
5 | 556 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
557 |
|
5 | 558 |
<section> |
61 | 559 |
<h3 id="event-touchcancel">The <dfn class="event">touchcancel</dfn> event</h3> |
85 | 560 |
<p> |
561 |
A user agent must dispatch this event type to indicate when a touch |
|
562 |
point has been disrupted in an implementation-specific manner, such as |
|
563 |
a synchronous event or action originating from the UA canceling the |
|
564 |
touch, or the touch point leaving the document window into a |
|
565 |
non-document area which is capable of handling user interactions. |
|
566 |
(e.g. The UA's native user interface, plug-ins) A user agent may |
|
567 |
also dispatch this event type when the user places more <a>touch |
|
568 |
point</a>s on the touch surface than the device or implementation is |
|
569 |
configured to store, in which case the earliest <a>Touch</a> object |
|
570 |
in the <a>TouchList</a> should be removed. |
|
571 |
</p> |
|
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
572 |
|
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
573 |
<p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
574 |
The <a>target</a> of this event must be the same <a>Element</a> on |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
575 |
which the <a>touch point</a> started when it was first |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
576 |
placed on the surface, even if the <a>touch point</a> has since moved |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
577 |
outside the interactive area of the <a>target</a> element. |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
578 |
</p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
579 |
|
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
580 |
<p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
581 |
The <a>touch point</a> or points that were removed must be included |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
582 |
in the <a>changedTouches</a> attribute of the <a>TouchEvent</a>, and |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
583 |
must not be included in the <a>touches</a> and <a>targetTouches</a> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
584 |
attributes. |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
585 |
</p> |
5 | 586 |
</section> |
4 | 587 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
588 |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
589 |
<section> |
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
590 |
<h2>Extensions to the <a>Document</a> Interface</h2> |
85 | 591 |
<p> |
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
592 |
The <a>Document</a> interface [[!DOM-LEVEL-3-CORE]] contains methods |
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
593 |
by which the user can create <a>Touch</a> and <a>TouchList</a> |
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
594 |
objects. |
85 | 595 |
</p> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
596 |
|
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
597 |
<dl title='partial interface Document' class='idl'> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
598 |
<dt>Touch createTouch()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
599 |
<dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
600 |
Creates a <a>Touch</a> object with the specified attributes. |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
601 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
602 |
<dt>AbstractView view</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
603 |
<dt>EventTarget target</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
604 |
<dt>long identifier</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
605 |
<dt>long pageX</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
606 |
<dt>long pageY</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
607 |
<dt>long screenX</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
608 |
<dt>long screenY</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
609 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
610 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
611 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
612 |
<dt>TouchList createTouchList()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
613 |
<dd> |
85 | 614 |
Creates a <a>TouchList</a> object containing the specified |
615 |
<a>Touch</a> objects. |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
616 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
617 |
<dt>Touch[] touches</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
618 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
619 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
620 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
621 |
<dt>TouchList createTouchList()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
622 |
<dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
623 |
Creates a <a>TouchList</a> object containing a single <a>Touch</a>. |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
624 |
<dl class='parameters'> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
625 |
<dt>Touch touch</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
626 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
627 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
628 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
629 |
</section> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
630 |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
631 |
<section id="mouse-events"> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
632 |
<h2>Interaction with Mouse Events</h2> |
85 | 633 |
<p> |
634 |
The user agent may dispatch both touch events and mouse events |
|
635 |
[[!DOM-LEVEL-2-EVENTS]] in response to the same user input. If the |
|
636 |
user agent dispatches both touch events and mouse events in response to |
|
637 |
a single user action, then the <a>touchstart</a> event type must be |
|
638 |
dispatched before any mouse event types for that action. If the |
|
639 |
<a>preventDefault</a> method of <a>touchstart</a> or <a>touchmove</a> |
|
640 |
is called, the user agent should not dispatch any mouse event that |
|
641 |
would be a consequential result of the the prevented touch event. |
|
642 |
</p> |
|
58
22e39e76033e
Specify basic preventDefault behavior.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
57
diff
changeset
|
643 |
|
142
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
644 |
<p class="note"> |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
645 |
If a Web application can process touch events, it can intercept them, |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
646 |
and no corresponding mouse events would need to be dispatched by the |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
647 |
user agent. If the Web application is not specifically written for |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
648 |
touch input devices, it can react to the subsequent mouse events instead. |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
649 |
</p> |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
650 |
|
85 | 651 |
<p> |
98
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
652 |
If the user agent intreprets a sequence of touch events as a click, |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
653 |
then it should dispatch <a>mousemove</a>, <a>mousedown</a>, |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
654 |
<a>mouseup</a>, and <a>click</a> events (in that order) at the location |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
655 |
of the <a>touchend</a> event for the corresponding touch input. If the |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
656 |
contents of the document have changed during processing of the touch |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
657 |
events, then the user agent may dispatch the mouse events to a |
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
658 |
different target than the touch events. |
97
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
659 |
</p> |
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
660 |
|
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
661 |
<p> |
85 | 662 |
The default actions and ordering of any further touch and mouse events |
663 |
are implementation-defined, except as specified elsewhere. |
|
664 |
</p> |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
665 |
</section> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
666 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
667 |
<section> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
668 |
<h2>Glossary</h2> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
669 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
670 |
<dl> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
671 |
<dt><dfn>active touch point</dfn></dt> |
85 | 672 |
<dd> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
673 |
A <a>touch point</a> which is currently on the screen and is being |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
674 |
tracked by the user agent. The touch point becomes active when the |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
675 |
user agent first dispatches a <a>touchstart</a> event indicating its |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
676 |
appearance. It ceases to be active after the user agent dispatches a |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
677 |
<a>touchend</a> or <a>touchcancel</a> event indicating that the touch |
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
678 |
point is removed from the surface or no longer tracked. |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
679 |
</dd> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
680 |
|
12 | 681 |
<dt><dfn>touch point</dfn></dt> |
85 | 682 |
<dd> |
683 |
The coordinate point at which a pointer (e.g finger or stylus) |
|
684 |
intersects the target surface of an interface. This may apply to a |
|
685 |
finger touching a touch-screen, or an digital pen writing on a piece |
|
686 |
of paper. |
|
687 |
</dd> |
|
124
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
688 |
|
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
689 |
<dt><dfn>preventDefault</dfn></dt> |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
690 |
<dd> |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
691 |
If a event is cancelable, the preventDefault method is used to signify |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
692 |
that the event is to be canceled, and any default actions defined in the |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
693 |
user agent as a result of this event, or consequential events from the |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
694 |
canceled event will not occur. Calling this method on non-cancelable |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
695 |
events will have no effect. |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
696 |
</dd> |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
697 |
</dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
698 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
699 |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
700 |
<section id='issues' class='informative'> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
701 |
<h2>Issues</h2> |
85 | 702 |
<p> |
703 |
The working group maintains <a |
|
704 |
href='http://www.w3.org/2010/webevents/track/products/2' |
|
705 |
>a list of open issues in this specification</a>. These issues may be |
|
706 |
addressed in future revisions of the specification. |
|
707 |
</p> |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
708 |
</section> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
709 |
|
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
710 |
<section class='appendix informative'> |
4 | 711 |
<h2>Acknowledgements</h2> |
712 |
<p> |
|
85 | 713 |
Many thanks to the WebKit engineers for developing the model used as a |
714 |
basis for this spec, Neil Roberts (SitePen) for his summary of WebKit |
|
86 | 715 |
touch events, Peter-Paul Koch (PPK) for his write-ups and suggestions, |
85 | 716 |
Robin Berjon for developing the <a |
717 |
href="http://dev.w3.org/2009/dap/ReSpec.js/documentation.html" |
|
718 |
>ReSpec.js spec authoring tool</a>, and the WebEvents WG for their many |
|
719 |
contributions. |
|
4 | 720 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
721 |
|
85 | 722 |
<p> |
723 |
Many others have made additional comments as the spec developed, which |
|
724 |
have led to steady improvements. Among them are Matthew Schinckel, |
|
725 |
Andrew Grieve, and Cathy Chan. If I inadvertently omitted your name, |
|
726 |
please let me know. |
|
727 |
</p> |
|
4 | 728 |
</section> |
729 |
</body> |
|
730 |
</html> |