[fix] TouchableMixin async race condition

When a Touchable component returns 0 for
`touchableGetHighlightDelayMS()` the mixin may occasionally try to
detect if the press event occurred on the hit area before the hit area
has been determined. Clearing out this value ensures that
`positionOnActivate` is recalculated before that takes place.

Close #586
This commit is contained in:
Sam
2017-07-31 17:13:26 -07:00
committed by Nicolas Gallagher
parent 17d723559d
commit 4fa6f77d25
+1
View File
@@ -399,6 +399,7 @@ const TouchableMixin = {
if (delayMS !== 0) {
this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);
} else {
this.state.touchable.positionOnActivate = null;
this._handleDelay(e);
}