Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Filter touches when scrolling
Browse files Browse the repository at this point in the history
When native touch-action is supported, Chrome sends touchmoves with cancelable = false on the axis that is scrolling
  • Loading branch information
dfreedm committed Jul 31, 2014
1 parent 1e8dfd5 commit 2f17f3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@
},
touchmove: function(inEvent) {
if (HAS_TOUCH_ACTION) {
this.processTouches(inEvent, this.move);
// touchevent.cancelable == false is sent when the page is scrolling under native Touch Action in Chrome 36
// https://groups.google.com/a/chromium.org/d/msg/input-dev/wHnyukcYBcA/b9kmtwM1jJQJ
if (inEvent.cancelable) {
this.processTouches(inEvent, this.move);
}
} else {
if (!this.scrolling) {
if (this.scrolling === null && this.shouldScroll(inEvent)) {
Expand Down

0 comments on commit 2f17f3e

Please sign in to comment.