question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'isEqualNode' of undefined

See original GitHub issue

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

  1. focus on the Dropzone component
  2. 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.

reactdropzone

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
rolandjitsucommented, Feb 26, 2019

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

0reactions
rolandjitsucommented, Feb 28, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found