Skip to content

Commit

Permalink
Merge pull request #86 from Andorbal/master
Browse files Browse the repository at this point in the history
Bypass setTimeout when activation should happen immediately
  • Loading branch information
dcousens authored Apr 20, 2017
2 parents d37f461 + 013329e commit a51eda7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TappableMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ var Mixin = {
this.initScrollDetection();
this.initPressDetection(event, this.endTouch);
this.initTouchmoveDetection();
this._activeTimeout = setTimeout(this.makeActive, this.props.activeDelay);
if (this.props.activeDelay > 0) {
this._activeTimeout = setTimeout(this.makeActive, this.props.activeDelay);
} else {
this.makeActive();
}
} else if (this.onPinchStart &&
(this.props.onPinchStart || this.props.onPinchMove || this.props.onPinchEnd) &&
event.touches.length === 2) {
Expand Down

0 comments on commit a51eda7

Please sign in to comment.