{"action":"created","comment":{"url":"https://api.github.com/repos/google/WebFundamentals/pulls/comments/87080676","pull_request_review_id":7706507,"id":87080676,"diff_hunk":"@@ -253,220 +140,174 @@ If, however, you expect users to interact with multiple elements at the same\n time (using multi-touch), you should restrict the touch to the specific\n element.\n \n-<div class=\"clearfix\"></div>\n-\n+This is more flexible for users, but complicates the logic for manipulating\n+the UI and is less resilient to user error.\n \n-### TL;DR {: .hide-from-toc }\n-- For full device support, handle touch, mouse and Pointer Events.\n-- Always bind start event listeners to the element itself.\n-- If you want the user to interact with one particular element, bind your move and end listeners to the document in the touchstart method; ensure you unbind them from the document in the end listener.\n-- If you want to support multi-touch, either restrict move and end touch events to the element itself or handle all the touches on an element.\n+<div class=\"clearfix\"></div>\n \n+### Add event listeners\n \n-### Add Event Listeners\n+In Chrome (version 55 and later) and Internet Explorer + Edge `PointerEvents` are\n+the recommended approach for implementing custom gestures.\n \n-Touch events and mouse events are implemented on most mobile browsers.\n+In other browsers `TouchEvents` and `MouseEvents` are the correct approach.\n \n-The event names you need to implement are `touchstart`, `touchmove`,\n-`touchend` and `touchcancel`.\n+The great feature of `PointerEvents` is that it merges multiple types of input,\n+including mouse, touch and pen events, into one set of\n+callbacks. The events to listen for are `pointerdown`, `pointermove`,\n+`pointerup` and `pointercancel`.\n \n-For some situations, you may find that you would like to support mouse\n-interaction as well; which you can do with the mouse events:\n-`mousedown`, `mousemove`, and `mouseup`.\n+The equivalents in other browsers are `touchstart`, `touchmove`,\n+`touchend` and `touchcancel` for touch events and if you wanted to implement\n+the same gesture for mouse input you'd need to implement `mousedown`,\n+`mousemove`, and `mouseup`.\n \n-For Windows Touch devices, you need to support Pointer Events which are a\n-new set of events. Pointer Events merge mouse and touch events into one set of\n-callbacks. This is currently only supported in Internet Explorer 10+ with\n-the prefixed events `MSPointerDown`, `MSPointerMove`, and `MSPointerUp` and\n-in IE 11+ the unprefixed events `pointerdown`, `pointermove`, and `pointerup`.\n+If you have questions about which events to use, check out this table of\n+[Touch, mouse and pointer events](#touch-mouse-and-pointer-events)).\n \n-Touch, mouse and Pointer Events are the building blocks for adding new\n-gestures into your application (see \n-[Touch, mouse and Pointer events](#touch-mouse-and-pointer-events)).\n+Using these events requires calling the `addEventListener()` method on a DOM\n+element, along with the name of an event, a callback function and a boolean.\n+The boolean determines whether you should catch the event before or after\n+other elements have had the opportunity to catch and interpret the\n+events. (`true` means you want the event before other elements.)\n \n-Include these event names in the `addEventListener()` method, along with the\n-event’s callback function and a boolean. The boolean determines whether you\n-should catch the event before or after other elements have had the\n-opportunity to catch and interpret the events (`true` means we want the event\n-before other elements).\n+Here's an example of listening for the start of an interaction.\n \n <pre class=\"prettyprint\">\n {% includecode content_path=\"web/fundamentals/design-and-ui/input/touch/_code/touch-demo-1.html\" region_tag=\"addlisteners\" adjust_indentation=\"auto\" %}\n </pre>\n \n-[Try it](https://googlesamples.github.io/web-fundamentals/fundamentals/design-and-ui/input/touch/touch-demo-1.html){: target=\"_blank\" .external }","path":"src/content/en/fundamentals/design-and-ui/input/touch/index.md","position":357,"original_position":357,"commit_id":"cdd2c34b72da96c843dffcf5708a8eaf0b3417ca","original_commit_id":"cdd2c34b72da96c843dffcf5708a8eaf0b3417ca","user":{"login":"petele","id":718038,"avatar_url":"https://avatars.githubusercontent.com/u/718038?v=3","gravatar_id":"","url":"https://api.github.com/users/petele","html_url":"https://github.com/petele","followers_url":"https://api.github.com/users/petele/followers","following_url":"https://api.github.com/users/petele/following{/other_user}","gists_url":"https://api.github.com/users/petele/gists{/gist_id}","starred_url":"https://api.github.com/users/petele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petele/subscriptions","organizations_url":"https://api.github.com/users/petele/orgs","repos_url":"https://api.github.com/users/petele/repos","events_url":"https://api.github.com/users/petele/events{/privacy}","received_events_url":"https://api.github.com/users/petele/received_events","type":"User","site_admin":false},"body":"Please keep try its","created_at":"2016-11-08T20:51:20Z","updated_at":"2016-11-08T20:53:58Z","html_url":"https://github.com/google/WebFundamentals/pull/3846#discussion_r87080676","pull_request_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3846","_links":{"self":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/comments/87080676"},"html":{"href":"https://github.com/google/WebFundamentals/pull/3846#discussion_r87080676"},"pull_request":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3846"}}},"pull_request":{"url":"https://api.github.com/repos/google/WebFundamentals/pulls/3846","id":92849117,"html_url":"https://github.com/google/WebFundamentals/pull/3846","diff_url":"https://github.com/google/WebFundamentals/pull/3846.diff","patch_url":"https://github.com/google/WebFundamentals/pull/3846.patch","issue_url":"https://api.github.com/repos/google/WebFundamentals/issues/3846","number":3846,"state":"open","locked":false,"title":"Adding changes from previous PR","user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars.githubusercontent.com/u/139760?v=3","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"body":"cc @RByers @patrickhlauke @jpmedley ","created_at":"2016-11-08T20:05:14Z","updated_at":"2016-11-08T20:53:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01ca0b4f46b055db136d8128dde3e4b7cd0b5e35","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3846/commits","review_comments_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3846/comments","review_comment_url":"https://api.github.com/repos/google/WebFundamentals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/WebFundamentals/issues/3846/comments","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/cdd2c34b72da96c843dffcf5708a8eaf0b3417ca","head":{"label":"google:touch-changes-2","ref":"touch-changes-2","sha":"cdd2c34b72da96c843dffcf5708a8eaf0b3417ca","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19249835,"name":"WebFundamentals","full_name":"google/WebFundamentals","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/WebFundamentals","description":"Best practices for modern web development","fork":false,"url":"https://api.github.com/repos/google/WebFundamentals","forks_url":"https://api.github.com/repos/google/WebFundamentals/forks","keys_url":"https://api.github.com/repos/google/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/google/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/google/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/google/WebFundamentals/events","assignees_url":"https://api.github.com/repos/google/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/google/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/google/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/google/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/google/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/google/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/google/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/google/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/google/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/google/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/google/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/WebFundamentals/merges","archive_url":"https://api.github.com/repos/google/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/google/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/google/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/google/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/google/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/google/WebFundamentals/releases{/id}","deployments_url":"https://api.github.com/repos/google/WebFundamentals/deployments","created_at":"2014-04-28T18:45:45Z","updated_at":"2016-11-08T20:15:52Z","pushed_at":"2016-11-08T20:05:15Z","git_url":"git://github.com/google/WebFundamentals.git","ssh_url":"git@github.com:google/WebFundamentals.git","clone_url":"https://github.com/google/WebFundamentals.git","svn_url":"https://github.com/google/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":1179749,"stargazers_count":6706,"watchers_count":6706,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1262,"mirror_url":null,"open_issues_count":107,"forks":1262,"open_issues":107,"watchers":6706,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"05b3776d6a3311789ab9056547c36fa19ddbc3d3","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19249835,"name":"WebFundamentals","full_name":"google/WebFundamentals","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/WebFundamentals","description":"Best practices for modern web development","fork":false,"url":"https://api.github.com/repos/google/WebFundamentals","forks_url":"https://api.github.com/repos/google/WebFundamentals/forks","keys_url":"https://api.github.com/repos/google/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/google/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/google/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/google/WebFundamentals/events","assignees_url":"https://api.github.com/repos/google/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/google/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/google/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/google/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/google/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/google/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/google/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/google/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/google/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/google/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/google/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/WebFundamentals/merges","archive_url":"https://api.github.com/repos/google/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/google/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/google/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/google/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/google/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/google/WebFundamentals/releases{/id}","deployments_url":"https://api.github.com/repos/google/WebFundamentals/deployments","created_at":"2014-04-28T18:45:45Z","updated_at":"2016-11-08T20:15:52Z","pushed_at":"2016-11-08T20:05:15Z","git_url":"git://github.com/google/WebFundamentals.git","ssh_url":"git@github.com:google/WebFundamentals.git","clone_url":"https://github.com/google/WebFundamentals.git","svn_url":"https://github.com/google/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":1179749,"stargazers_count":6706,"watchers_count":6706,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1262,"mirror_url":null,"open_issues_count":107,"forks":1262,"open_issues":107,"watchers":6706,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3846"},"html":{"href":"https://github.com/google/WebFundamentals/pull/3846"},"issue":{"href":"https://api.github.com/repos/google/WebFundamentals/issues/3846"},"comments":{"href":"https://api.github.com/repos/google/WebFundamentals/issues/3846/comments"},"review_comments":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3846/comments"},"review_comment":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3846/commits"},"statuses":{"href":"https://api.github.com/repos/google/WebFundamentals/statuses/cdd2c34b72da96c843dffcf5708a8eaf0b3417ca"}}}}
{"actor":{"display_login":"petele"}}