author | Matt Brubeck <mbrubeck@mozilla.com> |
Thu, 24 Jul 2014 15:19:38 -0700 | |
branch | v1-errata |
changeset 230 | bca491d2ba3f |
parent 229 | 0c110aed1866 |
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> |
212
4f579e1b7f99
updated webidl to remove 'optional', removed 'version 1' from name since we aren't making a version 2
Doug Schepers <schepers@w3.org>
parents:
211
diff
changeset
|
4 |
<title>Touch Events</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 |
--> |
|
180
30608da20e3d
Updates for LCWD publication
Art Barstow <art.barstow@nokia.com>
parents:
176
diff
changeset
|
12 |
<script src='https://www.w3.org/Tools/respec/respec-w3c-common.js' class='remove'></script> |
30608da20e3d
Updates for LCWD publication
Art Barstow <art.barstow@nokia.com>
parents:
176
diff
changeset
|
13 |
<script type="text/javascript" class='remove'> |
4 | 14 |
var respecConfig = { |
180
30608da20e3d
Updates for LCWD publication
Art Barstow <art.barstow@nokia.com>
parents:
176
diff
changeset
|
15 |
// specification status (e.g. WD, LC, NOTE, etc.). If in doubt use ED. |
221 | 16 |
specStatus: "ED", |
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 |
|
221 | 26 |
publishDate: "2014-05-29", |
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 |
|
211
54c23781ac98
changed pub status and date
Doug Schepers <schepers@w3.org>
parents:
210
diff
changeset
|
34 |
previousPublishDate: "2013-05-09", |
54c23781ac98
changed pub status and date
Doug Schepers <schepers@w3.org>
parents:
210
diff
changeset
|
35 |
previousMaturity: "PR", |
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 |
|
211
54c23781ac98
changed pub status and date
Doug Schepers <schepers@w3.org>
parents:
210
diff
changeset
|
41 |
// lcEnd: "2013-02-14", |
54c23781ac98
changed pub status and date
Doug Schepers <schepers@w3.org>
parents:
210
diff
changeset
|
42 |
// prEnd: "2013-06-06", |
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 |
|
180
30608da20e3d
Updates for LCWD publication
Art Barstow <art.barstow@nokia.com>
parents:
176
diff
changeset
|
46 |
extraCSS: ["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/" }, |
207
99d11195a3eb
Per agreement, add ArtB to Editor list
Art Barstow <art.barstow@nokia.com>
parents:
206
diff
changeset
|
57 |
{ name: "Arthur Barstow", |
99d11195a3eb
Per agreement, add ArtB to Editor list
Art Barstow <art.barstow@nokia.com>
parents:
206
diff
changeset
|
58 |
company: "Nokia", companyURL: "http://www.nokia.com/" }, |
4 | 59 |
], |
60 |
||
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
61 |
// authors, add as many as you like. |
4 | 62 |
// This is optional, uncomment if you have authors as well as editors. |
63 |
// only "name" is required. Same format as editors. |
|
64 |
||
65 |
//authors: [ |
|
66 |
// { name: "Your Name", url: "http://example.org/", |
|
67 |
// company: "Your Company", companyURL: "http://example.com/" }, |
|
68 |
//], |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
69 |
|
4 | 70 |
// name of the WG |
71 |
wg: "Web Events Working Group", |
|
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
72 |
|
4 | 73 |
// URI of the public WG page |
74 |
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
|
75 |
|
4 | 76 |
// name (with the @w3c.org) of the public mailing to which comments are due |
221 | 77 |
wgPublicList: "public-touchevents", |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
78 |
|
4 | 79 |
// URI of the patent status for this WG, for Rec-track documents |
80 |
// !!!! IMPORTANT !!!! |
|
81 |
// This is important for Rec-track documents, do not copy a patent URI from a random |
|
82 |
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood |
|
83 |
// Team Contact. |
|
84 |
wgPatentURI: "http://www.w3.org/2004/01/pp-impl/45559/status", |
|
85 |
}; |
|
86 |
</script> |
|
194
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
87 |
<script type="text/javascript" id="fixuphook"> |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
88 |
(function () { |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
89 |
// Hacky fix-up hook to patch up return types generated by respec.js, as special |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
90 |
// operations like the ones in specialOps are not officially supported. |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
91 |
var specialOps = ['getter ', 'setter ', 'creator ', 'deleter ', 'caller ', 'omittable ']; |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
92 |
var fixUpCaller = window.setInterval(function() { |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
93 |
|
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
94 |
// Check if respec.js is done. |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
95 |
var respecJS = document.querySelectorAll(".remove"); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
96 |
if (respecJS.length > 0) return; |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
97 |
|
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
98 |
else |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
99 |
{ |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
100 |
// Performance-wise, this is a stupid idea. For long specs it's probably |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
101 |
// going to take a *extremely* long time to finish. You have been warned. |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
102 |
var tags = document.getElementsByTagName('a'); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
103 |
|
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
104 |
for (var i = 0; i < tags.length; i++) |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
105 |
for (var j = 0; j < specialOps.length; j++) |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
106 |
if (tags[i].textContent.indexOf(specialOps[j]) === 0 && |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
107 |
tags[i].parentNode.previousSibling.textContent.indexOf('Return type:') !== -1) |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
108 |
tags[i].textContent = tags[i].textContent.substring(specialOps[j].length - 1); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
109 |
|
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
110 |
// Clean-up script element and interval caller |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
111 |
var fixUpEl = document.getElementById('fixuphook'); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
112 |
fixUpEl.parentNode.removeChild(fixUpEl); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
113 |
|
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
114 |
window.clearInterval(fixUpCaller); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
115 |
} |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
116 |
}, 100); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
117 |
})(); |
bb8c57f3af32
Hacky fix-up hook for patching return types generated by respec.js
Sangwhan Moon <sangwhan@iki.fi>
parents:
193
diff
changeset
|
118 |
</script> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
119 |
|
66
9555f231576e
Fix another validation error.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
61
diff
changeset
|
120 |
<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
|
121 |
.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
|
122 |
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
|
123 |
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
|
124 |
} |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
125 |
|
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
126 |
pre.idl { |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
127 |
white-space: pre-wrap; |
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
128 |
} |
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
|
129 |
</style> |
4 | 130 |
</head> |
131 |
<body> |
|
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
132 |
<section id='sotd'> |
210 | 133 |
By publishing this Recommendation, W3C expects that the functionality |
134 |
specified in this Touch Interface Recommendation will not be affected by |
|
135 |
changes to HTML5 or Web IDL as those specifications proceed to |
|
136 |
Recommendation. |
|
188
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
137 |
|
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
138 |
The WG has completed and approved this specification's |
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
139 |
<a href="http://w3c-test.org/webevents/tests/touch-events-v1/approved/">Test Suite</a> |
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
140 |
and created an |
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
141 |
<a href="http://www.w3.org/2010/webevents/wiki/TEv1ImplReport"> |
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
142 |
Implementation Report</a> that shows that two or more independent implementations |
3f81fed46a30
Status: change to ED; add link to Implementation Report and approved Test Suite
Art Barstow <art.barstow@nokia.com>
parents:
180
diff
changeset
|
143 |
pass each test. |
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
144 |
</section> |
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
145 |
|
4 | 146 |
<section id='abstract'> |
103 | 147 |
The Touch Events specification defines a set of low-level events that |
85 | 148 |
represent one or more points of contact with a touch-sensitive surface, |
149 |
and changes of those points with respect to the surface and any DOM |
|
150 |
elements displayed upon it (e.g. for touch screens) or associated with it |
|
151 |
(e.g. for drawing tablets without displays). It also addresses |
|
152 |
pen-tablet devices, such as drawing tablets, with consideration toward |
|
153 |
stylus capabilities. |
|
4 | 154 |
</section> |
5 | 155 |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
156 |
<section id='introduction' class='informative'> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
157 |
<h2>Introduction</h2> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
158 |
|
85 | 159 |
<p> |
160 |
User Agents that run on terminals which provide touch input to use web |
|
87 | 161 |
applications typically use interpreted mouse events to allow users |
85 | 162 |
to access interactive web applications. However, these interpreted |
163 |
events, being normalized data based on the physical touch input, tend |
|
87 | 164 |
to have limitations on delivering the intended user experience. |
85 | 165 |
Additionally, it is not possible to handle concurrent input regardless |
87 | 166 |
of device capability, due to constraints of mouse events: both |
167 |
system level limitations and legacy compatibility. |
|
85 | 168 |
</p> |
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
169 |
|
85 | 170 |
<p> |
171 |
Meanwhile, native applications are capable of handling both cases with |
|
172 |
the provided system APIs. |
|
173 |
</p> |
|
174 |
||
175 |
<p> |
|
176 |
The Touch Events specification provides a solution to this problem by |
|
86 | 177 |
specifying interfaces to allow web applications to directly handle touch |
85 | 178 |
events, and multiple touch points for capable devices. |
179 |
</p> |
|
191
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
180 |
|
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
181 |
<p class="note"> |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
182 |
The W3C's <a href="http://www.w3.org/WAI/PF/"> |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
183 |
Protocols and Formats Working Group</a> created a non-normative document |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
184 |
that includes a mapping of hardware events (e.g. keyboard events) to touch |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
185 |
events. For more information see |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
186 |
<a href="http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping"> |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
187 |
Touch Events Accessibility Mapping</a>. |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
188 |
</p> |
fe0ce5b66e4d
As requested by the Protocols and Formats WG in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0068.html>, added a non-normative note in the Introduction that points to the PFWG's <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping> document.
Art Barstow <art.barstow@nokia.com>
parents:
190
diff
changeset
|
189 |
|
81
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
190 |
</section> |
e5b2d26a6892
Corrected changes clobbered due to mistake
Sangwhan Moon <smoon@opera.com>
parents:
80
diff
changeset
|
191 |
|
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
|
192 |
<section id='conformance'> |
85 | 193 |
<p> |
194 |
This specification defines conformance criteria that apply to a single |
|
195 |
product: the <dfn id="dfn-user-agent">user agent</dfn> that implements |
|
196 |
the interfaces that it contains. |
|
197 |
</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
|
198 |
|
85 | 199 |
<p> |
214
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
200 |
WindowProxy is defined in [[!HTML5]]. |
85 | 201 |
</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
|
202 |
|
214
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
203 |
|
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
204 |
<h3 id="webidl-conform">WebIDL Conformance</h3> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
205 |
<p> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
206 |
The IDL blocks in this specification are conforming IDL |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
207 |
fragments as defined by the WebIDL specification [[!WEBIDL]]. |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
208 |
</p> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
209 |
|
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
210 |
<p> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
211 |
A conforming Web Events user agent must also be a <a href="http://www.w3.org/TR/WebIDL/#dfn-conforming-ECMAScript-implementation">conforming ECMAScript implementation</a> of this IDL fragments in this specification, with the following exception:</p> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
212 |
|
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
213 |
<ul> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
214 |
<li> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
215 |
<a href="http://www.w3.org/TR/WebIDL/#es-attributes">section 4.4.6 |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
216 |
of Web IDL</a> requires that IDL attributes are reflected as |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
217 |
accessor properties on interface prototype objects. Instead of |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
218 |
this, the user agent may reflect IDL attributes as data properties |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
219 |
on the platform objects that implement the relevant interface. |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
220 |
These data properties must have the same behavior when getting and |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
221 |
setting as would be exhibited when invoking the getter and setter |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
222 |
of the accessor properties on the platform object. |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
223 |
</li> |
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
224 |
</ul> |
85 | 225 |
<p> |
214
351dffeaeb4c
added expanded WebIDL conformance statement, changed publication date
Doug Schepers <schepers@w3.org>
parents:
212
diff
changeset
|
226 |
<strong>Note:</strong> Both ways of reflecting IDL attributes allow for simply getting and setting the property on the platform object to work. For example, given a Touch object aTouch, evaluating aTouch.target would return the EventTarget for the Touch object. If the user agent implements IDL attributes as accessor properties, then the property access invokes the getter which returns the EventTarget. If the user agent implements IDL attributes as data properties on the platform object with the same behavior as would be found with the accessor properties, then the object would appear to have an own property named "target" whose value is an EventTarget object, and the property access would return this value. |
189
67417356ff2a
Update WebIDL and text per request from Boris Zbarsky in:
Art Barstow <art.barstow@nokia.com>
parents:
188
diff
changeset
|
227 |
</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
|
228 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
229 |
|
4 | 230 |
<section> |
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
231 |
<h2><a>Touch</a> Interface</h2> |
85 | 232 |
<p> |
139
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
233 |
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
|
234 |
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
|
235 |
attributes must not change. |
85 | 236 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
237 |
|
46
e761aa494278
ISSUE-11: Rename TouchPoint to Touch
Matt Brubeck <mbrubeck@mozilla.com>
parents:
45
diff
changeset
|
238 |
<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
|
239 |
<dt>readonly attribute long identifier</dt> |
5 | 240 |
<dd> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
241 |
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
|
242 |
|
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
243 |
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
|
244 |
<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
|
245 |
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
|
246 |
refer to it must assign it the same <a>identifier</a>. |
5 | 247 |
</dd> |
4 | 248 |
|
139
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
249 |
<dt>readonly attribute EventTarget target</dt> |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
250 |
<dd> |
189
67417356ff2a
Update WebIDL and text per request from Boris Zbarsky in:
Art Barstow <art.barstow@nokia.com>
parents:
188
diff
changeset
|
251 |
The <a>EventTarget</a> on which the <a>touch point</a> started when it |
139
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
252 |
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
|
253 |
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
|
254 |
</dd> |
f9d12da970bf
Restore missing Touch.target attribute (LC-1).
Matt Brubeck <mbrubeck@mozilla.com>
parents:
131
diff
changeset
|
255 |
|
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
256 |
<dt>readonly attribute double screenX</dt> |
5 | 257 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
258 |
The horizontal coordinate of point relative to the screen in pixels |
5 | 259 |
</dd> |
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
260 |
<dt>readonly attribute double screenY</dt> |
5 | 261 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
262 |
The vertical coordinate of point relative to the screen in pixels |
5 | 263 |
</dd> |
4 | 264 |
|
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
265 |
<dt>readonly attribute double clientX</dt> |
5 | 266 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
267 |
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
|
268 |
excluding any scroll offset |
5 | 269 |
</dd> |
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
270 |
<dt>readonly attribute double clientY</dt> |
5 | 271 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
272 |
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
|
273 |
excluding any scroll offset |
5 | 274 |
</dd> |
275 |
||
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
276 |
<dt>readonly attribute double pageX</dt> |
5 | 277 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
278 |
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
|
279 |
including any scroll offset |
5 | 280 |
</dd> |
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
281 |
<dt>readonly attribute double pageY</dt> |
5 | 282 |
<dd> |
123
bee004414dba
ACTION-81 - Minor editorial changes, added units for properties in Touch interface
Sangwhan Moon <smoon@opera.com>
parents:
121
diff
changeset
|
283 |
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
|
284 |
including any scroll offset |
5 | 285 |
</dd> |
286 |
</dl> |
|
287 |
</section> |
|
288 |
||
289 |
<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
|
290 |
<h2><a>TouchList</a> Interface</h2> |
85 | 291 |
<p> |
292 |
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
|
293 |
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
|
294 |
created, its contents must not change. |
85 | 295 |
</p> |
192
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
296 |
<p> |
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
297 |
A TouchList object's <em>supported property indices</em> ([[!WEBIDL]]) |
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
298 |
are the numbers in the range 0 to one less than the length of the list. |
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
299 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
300 |
|
5 | 301 |
<dl title='interface TouchList' class='idl'> |
302 |
<dt>readonly attribute unsigned long length</dt> |
|
303 |
<dd> |
|
47
926af59e3515
Fix typos in previous commit
Matt Brubeck <mbrubeck@mozilla.com>
parents:
46
diff
changeset
|
304 |
returns the number of <a>Touch</a>es in the list |
5 | 305 |
</dd> |
189
67417356ff2a
Update WebIDL and text per request from Boris Zbarsky in:
Art Barstow <art.barstow@nokia.com>
parents:
188
diff
changeset
|
306 |
<dt>getter <a>Touch</a>? item (in unsigned long index)</dt> |
5 | 307 |
<dd> |
192
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
308 |
returns the <a>Touch</a> at the specified index in the list or |
0edc668e7910
Updates per request from Boris Zbarsky in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0087.html>.
Art Barstow <art.barstow@nokia.com>
parents:
191
diff
changeset
|
309 |
null if the index is not less than the length of the list. |
5 | 310 |
</dd> |
311 |
</dl> |
|
312 |
</section> |
|
313 |
||
314 |
<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
|
315 |
<h2><a>TouchEvent</a> Interface</h2> |
85 | 316 |
<p> |
317 |
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
|
318 |
<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
|
319 |
<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
|
320 |
initialized, its attributes must not change. |
85 | 321 |
</p> |
5 | 322 |
|
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
|
323 |
<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
|
324 |
<dt>readonly attribute <a>TouchList</a> touches</dt> |
4 | 325 |
<dd> |
85 | 326 |
a list of <a>Touch</a>es for every point of contact currently |
99 | 327 |
touching the surface. |
4 | 328 |
</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
|
329 |
<dt>readonly attribute <a>TouchList</a> targetTouches</dt> |
4 | 330 |
<dd> |
96
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
331 |
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
|
332 |
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
|
333 |
<a>target</a> of the current event. |
4 | 334 |
</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
|
335 |
<dt>readonly attribute <a>TouchList</a> changedTouches</dt> |
4 | 336 |
<dd> |
96
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
337 |
<p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
338 |
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
|
339 |
to the event. |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
340 |
</p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
341 |
<p> |
457c2df41b66
Add some more details about the targetTouches and changedTouches attributes.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
95
diff
changeset
|
342 |
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
|
343 |
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
|
344 |
<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
|
345 |
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
|
346 |
<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
|
347 |
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
|
348 |
</p> |
4 | 349 |
</dd> |
23
4958878564b1
ISSUE-8: Add an initTouchEvent method.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
22
diff
changeset
|
350 |
|
30
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
351 |
<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
|
352 |
<dd> |
85 | 353 |
<code>true</code> if the alt (Alternate) key modifier is activated; |
354 |
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
|
355 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
356 |
<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
|
357 |
<dd> |
85 | 358 |
<code>true</code> if the meta (Meta) key modifier is activated; |
359 |
otherwise <code>false</code>. On some platforms this attribute may |
|
360 |
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
|
361 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
362 |
<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
|
363 |
<dd> |
85 | 364 |
<code>true</code> if the ctrl (Control) key modifier is activated; |
365 |
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
|
366 |
</dd> |
795c0f6c44e7
ISSUE-12: altKey/ctrlKey/etc. should be attributes of TouchEvent, not TouchPoint
Matt Brubeck <mbrubeck@mozilla.com>
parents:
29
diff
changeset
|
367 |
<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
|
368 |
<dd> |
85 | 369 |
<code>true</code> if the shift (Shift) key modifier is activated; |
370 |
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
|
371 |
</dd> |
4 | 372 |
</dl> |
193
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
373 |
|
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
374 |
<section class="informative"> |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
375 |
<h2>TouchEvent Implementer's Note</h2> |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
376 |
<div class="note"> |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
377 |
<p>User agents should ensure that all <a>Touch</a> objects available from a given |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
378 |
<a>TouchEvent</a> are all associated to the same document that the <a>TouchEvent</a> was dispatched |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
379 |
to. To implement this, user agents should maintain a notion of the current |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
380 |
<em>touch-active</em> document. On first touch, this is set to the target document |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
381 |
where the touch was created. When all active touch points are released, the |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
382 |
<em>touch-active</em> document is cleared. All <a>TouchEvent</a>s are dispatched to the |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
383 |
current <em>touch-active</em> document, and each <a>Touch</a> object it contains refers |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
384 |
only to DOM elements (and co-ordinates) in that document. If a touch starts entirely |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
385 |
outside the currently <em>touch-active</em> document, then it is ignored entirely. </p> |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
386 |
</div> |
6f2c52cd50f6
Per the request from Sangwhan Moon in <http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0037.html>, add a note for implementers regarding event target handling and documents.
Art Barstow <art.barstow@nokia.com>
parents:
192
diff
changeset
|
387 |
</section> |
100
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 |
<section class="informative"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
390 |
<h2>Usage Examples</h2> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
391 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
392 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
393 |
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
|
394 |
<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
|
395 |
</p> |
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 |
<section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
398 |
<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
|
399 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
400 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
401 |
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
|
402 |
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
|
403 |
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
|
404 |
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
|
405 |
</p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
406 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
407 |
<pre class="example"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
408 |
<div id='touchable'> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
409 |
This element is touchable. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
410 |
</div> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
411 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
412 |
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
|
413 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
414 |
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
|
415 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
416 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
417 |
* 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
|
418 |
* "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
|
419 |
* 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
|
420 |
* 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
|
421 |
* is always true. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
422 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
423 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
424 |
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
|
425 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
426 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
427 |
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
|
428 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
429 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
430 |
* 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
|
431 |
* 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
|
432 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
433 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
434 |
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
|
435 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
436 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
437 |
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
|
438 |
{ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
439 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
440 |
* 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
|
441 |
* 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
|
442 |
* 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
|
443 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
444 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
445 |
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
|
446 |
} |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
447 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
448 |
}, false); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
449 |
</pre> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
450 |
</section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
451 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
452 |
<section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
453 |
<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
|
454 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
455 |
<p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
456 |
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
|
457 |
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
|
458 |
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
|
459 |
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
|
460 |
</p> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
461 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
462 |
<pre class="example"> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
463 |
<div id='touchable'> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
464 |
This element is touchable. |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
465 |
</div> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
466 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
467 |
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
|
468 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
469 |
/** |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
470 |
* 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
|
471 |
* 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
|
472 |
* 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
|
473 |
* |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
474 |
* Touch points removed: 1 |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
475 |
* 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
|
476 |
* 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
|
477 |
*/ |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
478 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
479 |
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
|
480 |
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
|
481 |
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
|
482 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
483 |
}, false); |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
484 |
</pre> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
485 |
</section> |
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
486 |
|
4bbe000815dd
Initial work for Issue-18 - may need some clean-up
Sangwhan Moon <smoon@opera.com>
parents:
99
diff
changeset
|
487 |
</section> |
8
3349d49e5f46
added force attribute; added issues around InkML, units, preventDefault(), timestamp
shepazu <schepers@w3.org>
parents:
7
diff
changeset
|
488 |
|
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
|
489 |
<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
|
490 |
<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
|
491 |
|
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
|
492 |
<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
|
493 |
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
|
494 |
<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
|
495 |
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
|
496 |
(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
|
497 |
</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
|
498 |
|
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
|
499 |
<!-- |
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
|
500 |
// 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
|
501 |
// 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
|
502 |
// 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
|
503 |
--> |
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
|
504 |
|
130
80a03ddfb79b
updates for 27-Oct-2011 LCWD
Art Barstow <art.barstow@nokia.com>
parents:
126
diff
changeset
|
505 |
<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
|
506 |
<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
|
507 |
<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
|
508 |
<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
|
509 |
<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
|
510 |
<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
|
511 |
<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
|
512 |
<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
|
513 |
<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
|
514 |
</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
|
515 |
<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
|
516 |
<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
|
517 |
<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
|
518 |
<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
|
519 |
<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
|
520 |
<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
|
521 |
<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
|
522 |
<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
|
523 |
</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
|
524 |
<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
|
525 |
<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
|
526 |
<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
|
527 |
<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
|
528 |
<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
|
529 |
<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
|
530 |
<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
|
531 |
<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
|
532 |
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
|
533 |
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
|
534 |
</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
|
535 |
</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
|
536 |
<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
|
537 |
<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
|
538 |
<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
|
539 |
<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
|
540 |
<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
|
541 |
<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
|
542 |
<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
|
543 |
<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
|
544 |
</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
|
545 |
<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
|
546 |
<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
|
547 |
<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
|
548 |
<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
|
549 |
<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
|
550 |
<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
|
551 |
<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
|
552 |
<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
|
553 |
</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
|
554 |
</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
|
555 |
</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
|
556 |
|
5 | 557 |
<section> |
85 | 558 |
<h3 id="event-touchstart">The <dfn class="event">touchstart</dfn> |
559 |
event</h3> |
|
560 |
<p> |
|
561 |
A user agent must dispatch this event type to indicate when the user |
|
562 |
places a <a>touch point</a> on the touch surface. |
|
563 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
564 |
|
85 | 565 |
<p> |
93
29ec4253b862
Issue-6: Events should be dispatched to targets within frames.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
92
diff
changeset
|
566 |
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
|
567 |
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
|
568 |
in the <a>child browsing context</a> of that frame. |
85 | 569 |
</p> |
95
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
570 |
|
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
571 |
<p> |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
572 |
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
|
573 |
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
|
574 |
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
|
575 |
events or scrolling. |
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
576 |
</p> |
5 | 577 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
578 |
|
5 | 579 |
<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
|
580 |
<h3 id="event-touchend">The <dfn class="event">touchend</dfn> event</h3> |
85 | 581 |
<p> |
582 |
A user agent must dispatch this event type to indicate when the user |
|
583 |
removes a <a>touch point</a> from the touch surface, also including |
|
584 |
cases where the touch point physically leaves the touch surface, such |
|
585 |
as being dragged off of the screen. |
|
586 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
587 |
|
85 | 588 |
<p> |
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
589 |
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
|
590 |
which the <a>touch point</a> started when it was first |
85 | 591 |
placed on the surface, even if the <a>touch point</a> has since moved |
592 |
outside the interactive area of the <a>target</a> element. |
|
593 |
</p> |
|
55
7df98116715b
Clarify targeting of touchmove and touchend events, and add tests.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
54
diff
changeset
|
594 |
|
85 | 595 |
<p> |
596 |
The <a>touch point</a> or points that were removed must be included |
|
597 |
in the <a>changedTouches</a> attribute of the <a>TouchEvent</a>, and |
|
598 |
must not be included in the <a>touches</a> and <a>targetTouches</a> |
|
599 |
attributes. |
|
600 |
</p> |
|
230
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
601 |
|
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
602 |
<p> |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
603 |
If this event is cancelled, any sequence of touch events that |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
604 |
includes this event must not be <a href="#click-events">interpreted |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
605 |
as a click</a>. |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
606 |
</p> |
5 | 607 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
608 |
|
5 | 609 |
<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
|
610 |
<h3 id="event-touchmove">The <dfn class="event">touchmove</dfn> event</h3> |
85 | 611 |
<p> |
612 |
A user agent must dispatch this event type to indicate when the user |
|
613 |
moves a <a>touch point</a> along the touch surface. |
|
614 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
615 |
|
85 | 616 |
<p> |
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
617 |
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
|
618 |
which the <a>touch point</a> started when it was first |
85 | 619 |
placed on the surface, even if the <a>touch point</a> has since moved |
620 |
outside the interactive area of the <a>target</a> element. |
|
621 |
</p> |
|
54
be35b766b5ef
Wrap some text to 80 characters.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
53
diff
changeset
|
622 |
|
85 | 623 |
<p> |
624 |
Note that the rate at which the user agent sends <a>touchmove</a> |
|
625 |
events is implementation-defined, and may depend on hardware |
|
626 |
capabilities and other implementation details. |
|
627 |
</p> |
|
95
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
628 |
|
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
629 |
<p> |
229
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
630 |
A user agent should suppress the default action caused by |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
631 |
any <a>touchmove</a> event until at least one <a>touchmove</a> event |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
632 |
associated with the same <a>active touch point</a> is not |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
633 |
cancelled. Whether the default action is suppressed |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
634 |
for <a>touchmove</a> events after at least one <a>touchmove</a> event |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
635 |
associated with the same <a>active touch point</a> is not cancelled is |
0c110aed1866
Update touchmove behavior on preventDefault
Tim Dresser <tdresser@chromium.org>
parents:
228
diff
changeset
|
636 |
implementation dependent. |
95
80bd73a2e5b2
preventDefault recommendations for touchstart/touchmove and scrolling.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
94
diff
changeset
|
637 |
</p> |
5 | 638 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
639 |
|
5 | 640 |
<section> |
61 | 641 |
<h3 id="event-touchcancel">The <dfn class="event">touchcancel</dfn> event</h3> |
85 | 642 |
<p> |
643 |
A user agent must dispatch this event type to indicate when a touch |
|
644 |
point has been disrupted in an implementation-specific manner, such as |
|
645 |
a synchronous event or action originating from the UA canceling the |
|
646 |
touch, or the touch point leaving the document window into a |
|
647 |
non-document area which is capable of handling user interactions. |
|
648 |
(e.g. The UA's native user interface, plug-ins) A user agent may |
|
649 |
also dispatch this event type when the user places more <a>touch |
|
650 |
point</a>s on the touch surface than the device or implementation is |
|
651 |
configured to store, in which case the earliest <a>Touch</a> object |
|
652 |
in the <a>TouchList</a> should be removed. |
|
653 |
</p> |
|
121
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
654 |
|
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
655 |
<p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
656 |
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
|
657 |
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
|
658 |
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
|
659 |
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
|
660 |
</p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
661 |
|
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
662 |
<p> |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
663 |
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
|
664 |
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
|
665 |
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
|
666 |
attributes. |
df403a9b8ba6
Addressed ISSUE-21 and ISSUE-22.
Cathy Chan <cathy.chan@nokia.com>
parents:
120
diff
changeset
|
667 |
</p> |
5 | 668 |
</section> |
4 | 669 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
670 |
|
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
671 |
<section> |
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
672 |
<h2>Extensions to the <a>Document</a> Interface</h2> |
85 | 673 |
<p> |
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
674 |
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
|
675 |
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
|
676 |
objects. |
85 | 677 |
</p> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
678 |
|
115
a4ba6867d4d0
Extend the Document interface instead of creating a DocumentTouch interface
Matt Brubeck <mbrubeck@mozilla.com>
parents:
107
diff
changeset
|
679 |
<dl title='partial interface Document' class='idl'> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
680 |
<dt>Touch createTouch()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
681 |
<dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
682 |
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
|
683 |
<dl class='parameters'> |
189
67417356ff2a
Update WebIDL and text per request from Boris Zbarsky in:
Art Barstow <art.barstow@nokia.com>
parents:
188
diff
changeset
|
684 |
<dt>WindowProxy view</dt> <dd></dd> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
685 |
<dt>EventTarget target</dt> <dd></dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
686 |
<dt>long identifier</dt> <dd></dd> |
222
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
687 |
<dt>double pageX</dt> <dd></dd> |
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
688 |
<dt>double pageY</dt> <dd></dd> |
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
689 |
<dt>double screenX</dt> <dd></dd> |
d6c06258cee0
Update coordinates from type long to double
Rick Byers <rbyers@google.com>
parents:
221
diff
changeset
|
690 |
<dt>double screenY</dt> <dd></dd> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
691 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
692 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
693 |
|
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
694 |
<dt>TouchList createTouchList()</dt> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
695 |
<dd> |
174
4d68f6253520
Fix description of touches parameter for createTouchList method
Art Barstow <art.barstow@nokia.com>
parents:
173
diff
changeset
|
696 |
Creates a <a>TouchList</a> object consisting of zero or more <a>Touch</a> objects. |
175
b38f9bc75738
Updated spec per proposal in http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0027.html
Art Barstow <art.barstow@nokia.com>
parents:
174
diff
changeset
|
697 |
Calling this method with no arguments creates a <a>TouchList</a> with no objects in it |
b38f9bc75738
Updated spec per proposal in http://lists.w3.org/Archives/Public/public-webevents/2013JanMar/0027.html
Art Barstow <art.barstow@nokia.com>
parents:
174
diff
changeset
|
698 |
and length 0 (zero). |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
699 |
<dl class='parameters'> |
212
4f579e1b7f99
updated webidl to remove 'optional', removed 'version 1' from name since we aren't making a version 2
Doug Schepers <schepers@w3.org>
parents:
211
diff
changeset
|
700 |
<dt>Touch... touches</dt> <dd></dd> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
701 |
</dl> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
702 |
</dd> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
703 |
</dl> |
201
6294f7949a33
Add a non-normative note about initTouchEvent
Matt Brubeck <mbrubeck@mozilla.com>
parents:
200
diff
changeset
|
704 |
|
6294f7949a33
Add a non-normative note about initTouchEvent
Matt Brubeck <mbrubeck@mozilla.com>
parents:
200
diff
changeset
|
705 |
<p class="note"> |
6294f7949a33
Add a non-normative note about initTouchEvent
Matt Brubeck <mbrubeck@mozilla.com>
parents:
200
diff
changeset
|
706 |
Some user agents implement an initTouchEvent method as part of the |
202
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
707 |
<a>TouchEvent</a> interface. When this method is available, scripts |
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
708 |
can use it to initialize the properties of a <a>TouchEvent</a> object, |
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
709 |
including its <a>TouchList</a> properties (which can be initialized |
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
710 |
with values returned from <a>createTouchList</a>). The |
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
711 |
<a>initTouchEvent</a> method is not yet standardized, but it may appear |
a892e79887ab
Minor editorial changes to the initTouchEvent note
Matt Brubeck <mbrubeck@mozilla.com>
parents:
201
diff
changeset
|
712 |
in some form in a future specification. |
201
6294f7949a33
Add a non-normative note about initTouchEvent
Matt Brubeck <mbrubeck@mozilla.com>
parents:
200
diff
changeset
|
713 |
</p> |
68
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
714 |
</section> |
e8bb9dc16d4e
Specify createTouch and createTouchList interfaces.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
66
diff
changeset
|
715 |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
716 |
<section id="mouse-events"> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
717 |
<h2>Interaction with Mouse Events</h2> |
85 | 718 |
<p> |
719 |
The user agent may dispatch both touch events and mouse events |
|
720 |
[[!DOM-LEVEL-2-EVENTS]] in response to the same user input. If the |
|
721 |
user agent dispatches both touch events and mouse events in response to |
|
722 |
a single user action, then the <a>touchstart</a> event type must be |
|
723 |
dispatched before any mouse event types for that action. If the |
|
230
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
724 |
<a>preventDefault</a> method of <a>touchstart</a>, <a>touchmove</a>, or |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
725 |
<a>touchend</a> is called, the user agent should not dispatch any mouse |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
726 |
event that would be a consequential result of the the prevented touch |
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
727 |
event. |
85 | 728 |
</p> |
58
22e39e76033e
Specify basic preventDefault behavior.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
57
diff
changeset
|
729 |
|
142
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
730 |
<p class="note"> |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
731 |
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
|
732 |
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
|
733 |
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
|
734 |
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
|
735 |
</p> |
6130d54c79cd
add editorial note requested by PFWG today
Art Barstow <art.barstow@nokia.com>
parents:
139
diff
changeset
|
736 |
|
230
bca491d2ba3f
Clarify effect of canceling touchend event.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
229
diff
changeset
|
737 |
<p id="click-events"> |
98
4ad645b57624
More clarification of behavior for mouse events (ISSUE-3)
Matt Brubeck <mbrubeck@mozilla.com>
parents:
97
diff
changeset
|
738 |
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
|
739 |
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
|
740 |
<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
|
741 |
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
|
742 |
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
|
743 |
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
|
744 |
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
|
745 |
</p> |
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
746 |
|
3f54db94ae0d
ISSUE-3: Click events should be dispatched after any touch events are processed.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
96
diff
changeset
|
747 |
<p> |
85 | 748 |
The default actions and ordering of any further touch and mouse events |
749 |
are implementation-defined, except as specified elsewhere. |
|
750 |
</p> |
|
35
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
751 |
</section> |
8624a3d5cbd7
ISSUE-9: Interaction of touch events and mouse events
Matt Brubeck <mbrubeck@mozilla.com>
parents:
34
diff
changeset
|
752 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
753 |
<section> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
754 |
<h2>Glossary</h2> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
755 |
|
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
756 |
<dl> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
757 |
<dt><dfn>active touch point</dfn></dt> |
85 | 758 |
<dd> |
91
b2c4ba0eb943
ISSUE-15: identifier attribute should be an opaque token
Matt Brubeck <mbrubeck@mozilla.com>
parents:
87
diff
changeset
|
759 |
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
|
760 |
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
|
761 |
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
|
762 |
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
|
763 |
<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
|
764 |
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
|
765 |
</dd> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
766 |
|
12 | 767 |
<dt><dfn>touch point</dfn></dt> |
85 | 768 |
<dd> |
769 |
The coordinate point at which a pointer (e.g finger or stylus) |
|
770 |
intersects the target surface of an interface. This may apply to a |
|
771 |
finger touching a touch-screen, or an digital pen writing on a piece |
|
772 |
of paper. |
|
773 |
</dd> |
|
124
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
774 |
|
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
775 |
<dt><dfn>preventDefault</dfn></dt> |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
776 |
<dd> |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
777 |
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
|
778 |
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
|
779 |
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
|
780 |
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
|
781 |
events will have no effect. |
a8b5ef36b865
ACTION-81 - explain preventDefault in the glossary.
Sangwhan Moon <smoon@opera.com>
parents:
123
diff
changeset
|
782 |
</dd> |
10
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
783 |
</dl> |
bad00fb0d663
added identifier algorithm; added glossary; added timestamp to TouchPoint
shepazu <schepers@w3.org>
parents:
9
diff
changeset
|
784 |
</section> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
785 |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
786 |
<section id='issues' class='informative'> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
787 |
<h2>Issues</h2> |
85 | 788 |
<p> |
789 |
The working group maintains <a |
|
190
65365cf7ba57
Update URL for Open Issues
Art Barstow <art.barstow@nokia.com>
parents:
189
diff
changeset
|
790 |
href='http://www.w3.org/2010/webevents/track/issues/open' |
85 | 791 |
>a list of open issues in this specification</a>. These issues may be |
792 |
addressed in future revisions of the specification. |
|
793 |
</p> |
|
71
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
794 |
</section> |
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
795 |
|
4c4b691aab2a
Add a link to the issue tracker.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
69
diff
changeset
|
796 |
<section class='appendix informative'> |
4 | 797 |
<h2>Acknowledgements</h2> |
798 |
<p> |
|
85 | 799 |
Many thanks to the WebKit engineers for developing the model used as a |
800 |
basis for this spec, Neil Roberts (SitePen) for his summary of WebKit |
|
86 | 801 |
touch events, Peter-Paul Koch (PPK) for his write-ups and suggestions, |
85 | 802 |
Robin Berjon for developing the <a |
803 |
href="http://dev.w3.org/2009/dap/ReSpec.js/documentation.html" |
|
804 |
>ReSpec.js spec authoring tool</a>, and the WebEvents WG for their many |
|
805 |
contributions. |
|
4 | 806 |
</p> |
20
3a04fe9b8ef2
Clean up some trailing whitespace and old comments.
Matt Brubeck <mbrubeck@mozilla.com>
parents:
19
diff
changeset
|
807 |
|
85 | 808 |
<p> |
809 |
Many others have made additional comments as the spec developed, which |
|
810 |
have led to steady improvements. Among them are Matthew Schinckel, |
|
200
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
811 |
Andrew Grieve, Cathy Chan, and Boris Zbarsky. If we inadvertently omitted your name, |
85 | 812 |
please let me know. |
813 |
</p> |
|
200
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
814 |
|
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
815 |
<p> |
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
816 |
The group acknowledges the following contributors to this specification's |
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
817 |
test suite: Matt Brubeck, Olli Pettay, Art Barstow, Cathy Chan and Rick Byers. |
504e8b9d4fa0
Added acknowledgement for the Test Contributors.
Art Barstow <art.barstow@nokia.com>
parents:
194
diff
changeset
|
818 |
</p> |
4 | 819 |
</section> |
203
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
820 |
|
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
821 |
<section class='appendix informative'> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
822 |
<h2>Changes Since Last Publication</h2> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
823 |
<p>The following non-substantive changes were made since the |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
824 |
<a href="http://www.w3.org/TR/2013/WD-touch-events-20130124/"> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
825 |
24 January 2013 Last Call Working Draft</a> was published: |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
826 |
</p> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
827 |
<ul> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
828 |
<li>Added a non-normative note for implementers regarding event targets |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
829 |
(<a href="https://dvcs.w3.org/hg/webevents/rev/6f2c52cd50f6">changeset</a>).</li> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
830 |
<li>Added a non-normative note regarding mapping hardware events to touch events |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
831 |
(<a href="https://dvcs.w3.org/hg/webevents/rev/fe0ce5b66e4d">changeset</a>).</li> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
832 |
<li>Minor Web IDL bug fixes and clarifications (changesets: |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
833 |
<a href="https://dvcs.w3.org/hg/webevents/rev/67417356ff2a">1</a>, |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
834 |
<a href="https://dvcs.w3.org/hg/webevents/rev/0edc668e7910">2</a>).</li> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
835 |
<li>Added a non-normative note regarding the <code>initTouchEvent</code> method |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
836 |
that is not standardized (changesets: |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
837 |
<a href="https://dvcs.w3.org/hg/webevents/rev/6294f7949a33">1</a>, |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
838 |
<a href="https://dvcs.w3.org/hg/webevents/rev/a892e79887ab">2</a>).</li> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
839 |
</ul> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
840 |
</section> |
b216e6e1e450
Added changes since LCWD section and started preparing for Proposed Recommendation
Art Barstow <art.barstow@nokia.com>
parents:
202
diff
changeset
|
841 |
|
4 | 842 |
</body> |
843 |
</html> |