bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Uncaught TypeError: Cannot read property 'parentNode' of null #680

Open PFight opened 2 years ago

PFight commented 2 years ago

Please only use GitHub issues for bug reports and feature requests.

  • [ ] Read the contributing guidelines
  • [ ] Bug reports containing repro steps are likely to be fixed faster
  • [ ] Feature requests should be multi-purpose, describe use cases
  • [ ] For support requests or questions, please refer to our Slack channel

In some cases during drag occurs next error inside dragula:

    dragula.js:563 Uncaught TypeError: Cannot read property 'parentNode' of null
        at getParent (dragula.js:563)
        at getImmediateChild (dragula.js:449)
        at HTMLHtmlElement.drag (dragula.js:388)

image

image

Situation occurs because of target is removed from DOM during the drag (it's custom reaction of drag container to drag over). It's needed to add null check there.

"dragula": "^3.7.3", "react-dragula": "^1.1.17",

PFight commented 2 years ago

Also occurs during drag over page, when some element removed from the DOM while dragging over it.

PFight commented 2 years ago

Fixed in temporary package dragula-fixed

ignaciostellino commented 1 year ago

@PFight do you think that you can also add this fix https://github.com/bevacqua/dragula/pull/529 in your package dragula-fixed ?

PFight commented 1 year ago

@PFight do you think that you can also add this fix #529 in your package dragula-fixed ?

Ok, you can make pull request to speed up process.

ignaciostellino commented 1 year ago

Ok, you can make pull request to speed up process.

@PFight Here you have https://github.com/PFight/dragula/pull/1

PFight commented 1 year ago

Ok, you can make pull request to speed up process.

@PFight Here you have PFight#1

Here you go dragula-fixed@3.7.5