Skip to content

Dragging & dropping element outside any dragular container  #74

@thefill

Description

@thefill

Scenario that generates error:

  1. App uses dragulaService in controller.
  2. dragularService "copy" option is set to true.
  3. User drags element from container (container with copy option).
  4. User drops element outside of any dragular container.

Error generated:

TypeError: Cannot read property 'splice' of undefined
at applyDrop (service.js:57)

Example that reproduces error:

I have successfully reproduced error in this plnkr example

Recommended fix:

Bailing out if drop target for dragularService "drop" event is null solves problem.

Pull request with applied fix:

Here you can find request for merging fix #75

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