Skip to content
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

Closed
sophiebits opened this issue May 5, 2015 · 4 comments
Closed

[TouchableMixin] Should cancel timers on unmount #1152

sophiebits opened this issue May 5, 2015 · 4 comments
Assignees
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.

Comments

@sophiebits
Copy link
Contributor

In TouchableMixin, touchableHandleResponderGrant sets this.touchableDelayTimeout and this.longPressDelayTimeout but if the component is unmounted before the timer fires, an error may be thrown, depending on the definition of touchableHandleActivePressIn.

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.)

@sophiebits sophiebits added the Good first issue Interested in collaborating? Take a stab at fixing one of these issues. label May 5, 2015
@brentvatne
Copy link
Collaborator

@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

@sophiebits
Copy link
Contributor Author

Fairly sure this is the right repo to change it.

@ide
Copy link
Contributor

ide commented May 6, 2015

MIght want to look into TimerMixin as well though I'm not familiar with mixins using mixins.

@brentvatne brentvatne self-assigned this May 29, 2015
@brentvatne brentvatne changed the title TouchableMixin should cancel timers on unmount [TouchableMixin] Should cancel timers on unmount May 29, 2015
@ghost
Copy link

ghost commented Aug 5, 2015

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.

@ghost ghost closed this as completed in a9b8ca0 Oct 3, 2015
MattFoley pushed a commit to skillz/react-native that referenced this issue Nov 9, 2015
Summary: Fixes facebook#1152
Closes facebook#3176

Reviewed By: @​svcscm

Differential Revision: D2506385

Pulled By: @vjeux
Crash-- pushed a commit to Crash--/react-native that referenced this issue Dec 24, 2015
Summary: Fixes facebook#1152
Closes facebook#3176

Reviewed By: @​svcscm

Differential Revision: D2506385

Pulled By: @vjeux
@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants