Skip to content

Commit

Permalink
Add touchCancel and touchEnd to local listener attachments
Browse files Browse the repository at this point in the history
They can block scrolling on touch devices
  • Loading branch information
nhunzaker committed Apr 7, 2017
1 parent c94c846 commit a655b5b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/renderers/dom/shared/ReactBrowserEventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ var localOnly = {
topWaiting: true,
topTouchMove: true,
topTouchStart: true,
topTouchCancel: true,
topTouchEnd: true,
};

/**
Expand Down Expand Up @@ -297,7 +299,8 @@ var ReactBrowserEventEmitter = Object.assign({}, ReactEventEmitterMixin, {
);
}
} else if (
!(isDocListening.hasOwnProperty(dependency) && isDocListening[dependency])
!(isDocListening.hasOwnProperty(dependency) &&
isDocListening[dependency])
) {
if (dependency === 'topScroll') {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(
Expand Down Expand Up @@ -359,7 +362,8 @@ var ReactBrowserEventEmitter = Object.assign({}, ReactEventEmitterMixin, {
for (var i = 0; i < dependencies.length; i++) {
var dependency = dependencies[i];
if (
!(isDocListening.hasOwnProperty(dependency) && isDocListening[dependency])
!(isDocListening.hasOwnProperty(dependency) &&
isDocListening[dependency])
) {
return false;
}
Expand Down

0 comments on commit a655b5b

Please sign in to comment.