diff --git a/Libraries/vendor/react_contrib/interactions/Touchable/Touchable.js b/Libraries/vendor/react_contrib/interactions/Touchable/Touchable.js index 93c4a7b59..3ff08f736 100644 --- a/Libraries/vendor/react_contrib/interactions/Touchable/Touchable.js +++ b/Libraries/vendor/react_contrib/interactions/Touchable/Touchable.js @@ -303,6 +303,15 @@ var LONG_PRESS_ALLOWED_MOVEMENT = 10; * @lends Touchable.prototype */ var TouchableMixin = { + /** + * Clear all timeouts on unmount + */ + componentWillUnmount: function() { + this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); + this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); + this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); + }, + /** * It's prefer that mixins determine state in this way, having the class * explicitly mix the state in the one and only `getInitialState` method.