mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
Correctly bind Touchable.js setTimeout
Summary: Fixes https://github.com/facebook/react-native/issues/5337 `this.setTimeout` is undefined and the scope wasn't being passed through causing a RedBox error. Closes https://github.com/facebook/react-native/pull/5376 Reviewed By: svcscm Differential Revision: D2838623 Pulled By: androidtrunkagent fb-gh-sync-id: 513210298b6c39d812047a03d8f2edd5c11e46f6
This commit is contained in:
parent
969c520126
commit
f644af34ef
@ -670,7 +670,7 @@ var TouchableMixin = {
|
||||
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
|
||||
} else if (!newIsHighlight && curIsHighlight && this.touchableHandleActivePressOut) {
|
||||
if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {
|
||||
this.pressOutDelayTimeout = this.setTimeout(function() {
|
||||
this.pressOutDelayTimeout = setTimeout(() => {
|
||||
this.touchableHandleActivePressOut(e);
|
||||
}, this.touchableGetPressOutDelayMS());
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user