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

Uncaught TypeError in onDocumentMouseDown #230

Closed
elmeister opened this issue Aug 28, 2016 · 3 comments
Closed

Uncaught TypeError in onDocumentMouseDown #230

elmeister opened this issue Aug 28, 2016 · 3 comments

Comments

@elmeister
Copy link

elmeister commented Aug 28, 2016

First of all - thanks for the great module!

There is a bit annoying error displayed in onDocumentMousedown, when node is null.
Here is the fiddle, to reproduce error in console - please select any of react-select options.
Right after any option is picked, dropdown is destroyed, so while (node !== document) obviously can't reach document in the parent chain.
Everything works great, just will greatly appreciate, if null check will be added for node to remove red lines in console.

And thanks again for clean code and such a cool autosuggest component!

@moroshko
Copy link
Owner

Thanks for your kind words. Enjoy!

@baktun14
Copy link

@moroshko Hi, I had the same issue and I'm glad you fixed it but I was wondering why is the plugging being registered on the DocumentMouseDown event instead of individually on each suggestions?

@moroshko
Copy link
Owner

@mbeauchamp7 onDocumentMouseDown was introduced to address an issue in IE11 when suggestions container has a scroll bar. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants