TypeError: Cannot read property 'isEqualNode' of undefined
See original GitHub issueHi. I have a react-dropzone thatbefore was letting users opening the file upload dialog by pressing te spacebar, but I checked now and it doesn’t work.
I updated to 8.2.0, still no avail. I am attaching a screenshot of the console error. I see that the code fails in a code snippet that you guys added in December.
Not sure why it fails on my end, but maybe protect it with a
if (this.node && !_this.node.isEqualNode(evt.target))
might solve it?
Do you want to request a feature or report a bug?
- I found a bug
- I want to propose a feature
What is the current behavior? Can’t open the file dialog by pressing spacebar
If the current behavior is a bug, please provide the steps to reproduce.
- focus on the Dropzone component
- press spacebar to open the file upload dialog
What is the expected behavior?
Expecting the file dialog to open. It does not, as there is a console error.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Node.isEqualNode() - Web APIs - MDN Web Docs
The isEqualNode() method of the Node interface tests whether two nodes ... Note: This parameter is not optional, but can be set to...
Read more >Uncaught TypeError: Cannot read properties of null
The error is self explanatory, the error happened while trying to execute this part of the code. document.getElementById("nam" + x).
Read more >How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >JavaScript undefined Property - W3Schools
Variable with no value: ... Definition and Usage. The undefined property indicates that a variable has not been assigned a value, or not...
Read more >cannot read properties of undefined (reading 'create') node js
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@goodoldneon right, that’s because you’re overriding the ref that
getRootProps()
sets.Can you describe what is your use case? Maybe we need to think about exposing the ref somehow.
@NunoCardoso this will change anyway in the next major version.
We’re working on using the hooks API. You will also be able to get the ref to the dropzone and input elements with the new release.
I will close this now, but please let me know if you have any other issues.