Touch Events

Touch Events (DOM)

[22] Touch Events は、タッチデバイスの操作によるイベントについての DOM 仕様です。

仕様書

インターフェイス

イベント

イベントハンドラー属性

処理モデル

[24] 既定動作の詳細やマウスイベントとの相互作用の詳細など、詳細な処理モデルは仕様上規定されていません。

タッチ装置を持たないブラウザー

[55] Touch Events をいわゆるスマートフォン版の Webサイトへの切り替えに使ったり、 ChromeWebKit とその他のブラウザーの判定に使ったりする不思議サイトが非常に多いことから、 タッチ装置を有しない環境では Touch Events を無効にせざるを得なくなっています。 タッチ装置を有するデスクトップブラウザーや非 WebKit ブラウザーではそのようなサイトは正しく動作しませんが、 有効な対策は見つかっていないようです。

[56] タッチデバイスの無いデスクトップChrome は、 Touch, TouchList, TouchEventインターフェイスオブジェクトが存在しますが、 createTouchcreateTouchListwindow.ontouchstart などは存在しないようです。同じく Firefox は、 Touch 等も含めてすべて存在しないようです。

[57] このような実装上極めて重要な情報はなぜか W3C 勧告にもまったく言及がありません。

タッチ操作

[85] マウス操作も参照。

歴史

WebKit での実装

[58] Touch Events ははじめ Mobile Safari で実装されました。

第1版

[59] W3CWeb Events WG が組織され、 Touch Events 仕様書となりました。ただし Apple はこの WG に参加していません。

[60] Touch Events 仕様は後に第1版と第2版に分割されています (W3C ではよくあること)。

PAG

[61] W3CPatent Policy に則った手続きで Apple が関連特許の保有を通知したため、 PAG が設けられ、その影響が検討されました。 Touch Events 仕様書には影響しないという結論になり、 W3C 勧告に進めることになりました。

第1版勧告

[62] なお勧告化にあたり、 ED 状態で活発に開発が進んでいるものの W3C Process 上は CRWebIDL を参照していることが W3C Process 上問題になり、 W3C Director である TimBL から物言いがつき、 WebIDL の一部規定を曖昧にコピペすることで決着しています (W3Cではよくあること)。 詳しくは W3C Process の項を参照。

Gecko での実装

[63] Gecko は独自に MozTouch 系イベントを実装していましたが、 Touch Events に切り替えています。その過程で >>55 のような問題も見つかりました。

第2版

[64] 元の WebKit の実装になかった radiusXtouchenter などの追加分は第2版として分離されていましたが、 Pointer Events と競合するおそれがあることからこれを取りやめ、 Web Events WG も終了することになりました。

[65] ただし Firefox はこれら追加分も既に実装しています。

[66] 第2版は第1版も包含していますが、第1版の部分に分離後加えられた変更は第2版にすべては反映されていないようです。 (W3Cではよくあること。)

[67] Touch Events incremental improvements - Google ドキュメント ( ( 版)) <https://docs.google.com/a/chromium.org/document/d/1x-yE4CmTZlZQXea4_FPjgly5TOvF28UBNs9gZ5aGUhg/edit?pli=1>

[68] IRC logs: freenode / #whatwg / 20141215 ( ( 版)) <http://krijnhoetmer.nl/irc-logs/whatwg/20141215#l-356>

[69] public-touchevents@w3.org Mail Archives ( ( 版)) <http://lists.w3.org/Archives/Public/public-touchevents/>

[70] webevents: Summary ( ( 版)) <https://dvcs.w3.org/hg/webevents/summary>

[71] Touch Events CG Call -- 16 Dec 2014 ( ( 版)) <http://www.w3.org/2014/12/16-touchevents-minutes.html>

[72] Touch Events ( ( 版)) <https://dvcs.w3.org/hg/webevents/raw-file/v1-errata/touchevents.html>

[73] Touch Events Accessibility Mapping - Protocols and Formats Working Group Wiki ( ( 版)) <http://www.w3.org/WAI/PF/wiki/Touch_Events_Accessibility_Mapping>

[74] Touch Events Extensions ( ( 版)) <http://www.w3.org/TR/touch-events-extensions/>

[75] Touch Events Extensions ( ( 版)) <http://www.w3.org/TR/2013/NOTE-touch-events-extensions-20131031/>

[76] Touch Events Errata ( ( 版)) <http://www.w3.org/TR/2013/REC-touch-events-20131010/REC-touch-events-20131010-errata.html>

[77] w3c/touch-events ( ( 版)) <https://github.com/w3c/touch-events>

[78] Touch Events Community Group ( ( 版)) <https://www.w3.org/community/touchevents/wiki/Main_Page>

[79] Touch event behavior details across browsers - Google ドキュメント ( ( 版)) <https://docs.google.com/a/chromium.org/document/d/12k_LL_Ot9GjF8zGWP9eI_3IMbSizD72susba0frg44Y/edit>

[80] Touch Events Community Group ( 版) <https://www.w3.org/community/touchevents/>

[81] w3c/touch-events ( 版) <https://github.com/w3c/touch-events>

[82] Touch Events Extensions ( 版) <http://rawgit.com/w3c/touch-events/master/touchevents.html>

[83] Touch Events v1 (with Errata Included) ( 版) <http://rawgit.com/w3c/touch-events/v1-errata/touchevents.html>

[84] Identifying MouseEvents derived from TouchEvents - Google ドキュメント ( 版) <https://docs.google.com/a/chromium.org/document/d/1-ZUtS3knhJP4RbWC74fUZbNp6cbytG6Wen7hewdCtdo/edit?pli=1#heading=h.rbcct8al2kop>

[86] Changed license, changed WG info to CG, used CG stylesheet · w3c/touch-events@418619f ( 版) <https://github.com/w3c/touch-events/commit/418619fb7b853a322254d3dd474c01715c2d248a>

[87] Make document.createEvent("touchevent") sometimes throw · whatwg/dom@cb7c16b ( 版) <https://github.com/whatwg/dom/commit/cb7c16b764d64e43da1f9d62da7d4066341ff0e5>

[88] Add @patrickhlauke as editor ( (@patrickhlauke著, )) <https://github.com/w3c/touch-events/commit/0e9c9fa941e2ed4977e17640f9c54754c9bdb247>

[89] Touch event behavior details across browsers - Google ドキュメント () <https://docs.google.com/document/d/12k_LL_Ot9GjF8zGWP9eI_3IMbSizD72susba0frg44Y/edit?pref=2&pli=1>

[90] Touch scrolling intervention in Chromium - Google ドキュメント () <https://docs.google.com/document/d/1mlUcJZHLyz1fip7CNEiU0w7JgcxBZUilvOwg0i9ZvQc/edit?pref=2&pli=1#heading=h.4lsqlgilqy1g>

[91] Forced passive touch listeners · Issue #18 · WICG/interventions () <https://github.com/WICG/interventions/issues/18>

[92] Reference TouchEvents spec for compat mouse events (#119) (NavidZ著, ) <https://github.com/w3c/pointerevents/commit/4c0a51b52526c1b48afa2a6bce4858aa238a1f11>

[93] Add Safari iOS 10.3 extensions for stylus (RByers著, ) <https://github.com/w3c/touch-events/commit/c1ded16b10517e686b0fed06eb5e0b7839003c72>

[94] Add [Exposed=Window] to Constructor (#88) (patrickhlauke著, ) <https://github.com/w3c/touch-events/commit/b12e03f49b98725105b0b0f2aeb912bea2562933>

[95] Ask for tests for normative changes in README (#90) (foolip著, ) <https://github.com/w3c/touch-events/commit/2d98e7de2fae6dba494b714da67b879fa328adac>

[96] Ask for tests for normative changes in README by foolip · Pull Request #90 · w3c/touch-events () <https://github.com/w3c/touch-events/pull/90>