Skip to content

Remove placeholder when a dragItem is no longer over a valid dropTarget #553

@lukasoppermann

Description

@lukasoppermann

You can test the current implementation here: http://lukasoppermann.github.io/html5sortable/index.html

Current behavior

  • Item is outside of the list (no valid dropTarget → item will be placed back to its original position)
  • Last valid position of placeholder is still visible

Screenshot 2020-07-20 at 13 40 19

Desired behavior

  • when item is outside valid dropTarget no placeholder is visible
  • an icon / cursor / visual effect makes it apparent that the item will not be moved / move is canceled (a class should be added to the sortable so that it can be styles)
  • placeholder should be hidden by default but moved back to original position where the item will be returned (with a special class so it can be styled and shown if so desired)
    • if the list is set to copy, the placeholder is just hidden as there is no original position
  • investigate of ghost can be updated to show visual effect (may not be possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR neededThis issue requires a PR to be fixed. If you have time to help, please send a PR.featureNew feature or enhancementhelp wanted

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions