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: Cannot read property 'classList' of null" when dragging branch #73

Open
rabbitfufu opened this issue May 16, 2019 · 2 comments

Comments

@rabbitfufu
Copy link

rabbitfufu commented May 16, 2019

Hello! Firstly, thank-you for taking the time to develop this component, it is much needed by the community.

I have noticed that the following error appears intermittently in Chrome Dev Tools while dragging a branch of the tree:

helper-js.es.js?3962:1237 Uncaught TypeError: Cannot read property 'classList' of null
at hasClass (helper-js.es.js?3962:1237)
at Object.targetPrevEl (vue-draggable-nested-tree.es.js?b1f6:1043)
at eval (vue-draggable-nested-tree.es.js?b1f6:488)
at Cache.remember (vue-draggable-nested-tree.es.js?b1f6:460)
at Object.get (vue-draggable-nested-tree.es.js?b1f6:487)
at Object.targetPrev (vue-draggable-nested-tree.es.js?b1f6:1050)
at eval (vue-draggable-nested-tree.es.js?b1f6:488)
at Cache.remember (vue-draggable-nested-tree.es.js?b1f6:460)
at Object.get (vue-draggable-nested-tree.es.js?b1f6:487)
at Object.appendPrev [as append prev] (vue-draggable-nested-tree.es.js?b1f6:641)

At first I thought it must be my own code. However I am actually able to reproduce this same error on the vue-draggable-nested-tree demo site.

It's difficult to describe exactly how to reproduce this. It seems to happen when dragging a node in a circular motion repeatedly overtop of other nodes, forcing the tree to reflow. The error happens fairly consistently when I do this.

Thanks (in advance) for your help!

@rabbitfufu rabbitfufu changed the title Uncaught TypeError: Cannot read property 'classList' of null when dragging branch "Uncaught TypeError: Cannot read property 'classList' of null" when dragging branch May 16, 2019
@phphe
Copy link
Owner

phphe commented May 17, 2019

I also got it. But it does not affect normal use.

@rabbitfufu
Copy link
Author

rabbitfufu commented May 17, 2019

One thing I have found that it does break is hot-reloading during development. After a bunch of those errors occur, changes to the code are no longer hot-reloaded, and instead require a refresh.

It would be best if the script does not spill out errors during normal use.

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

2 participants