-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TouchableMixin] Should cancel timers on unmount #1152
Comments
@spicyj - it looks like TouchableMixin is vendored in react_contrib, is this something that we would change directly on the react-native repo or is there another repo for this? Happy to take a look |
Fairly sure this is the right repo to change it. |
MIght want to look into TimerMixin as well though I'm not familiar with mixins using mixins. |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
Summary: Fixes facebook#1152 Closes facebook#3176 Reviewed By: @svcscm Differential Revision: D2506385 Pulled By: @vjeux
Summary: Fixes facebook#1152 Closes facebook#3176 Reviewed By: @svcscm Differential Revision: D2506385 Pulled By: @vjeux
In TouchableMixin,
touchableHandleResponderGrant
setsthis.touchableDelayTimeout
andthis.longPressDelayTimeout
but if the component is unmounted before the timer fires, an error may be thrown, depending on the definition oftouchableHandleActivePressIn
.In particular, in TouchableHighlight's _showUnderlay,
this.refs[UNDERLAY_REF]
can be undefined if the component is unmounted and an exception is thrown. (And the conditional in _hideUnderlay is should be unnecessary after this change.)The text was updated successfully, but these errors were encountered: