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

When clicked fast enough, component throws error like "cannot call function focus() of undefined" #208

Closed
voroshkov opened this issue May 25, 2015 · 2 comments
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Milestone

Comments

@voroshkov
Copy link

I found this issue during writing tests with React.TestUtils.
The issue is annoying, but the solution is simple:
in ComponentDidUpdate you must add clearTimeout(this._focusTimeout) before overwriting this._focusTimeout variable with new timeout id.

@dcousens
Copy link
Collaborator

@voroshkov can you please add a PR?

@dcousens dcousens added the issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer label May 27, 2015
@dcousens dcousens added this to the 0.4.10 milestone May 27, 2015
PetrGlad added a commit to PetrGlad/react-select that referenced this issue Sep 25, 2015
JedWatson added a commit that referenced this issue Sep 30, 2015
Fix for #208 and #434. Reset timeout before setting new one.
@jochenberger
Copy link
Contributor

I think that this can be closed since #481 was merged.

@jossmac jossmac closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants