Skip to content

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

@PFight

Description

@PFight

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions