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

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

Open
4 tasks
lukasoppermann opened this issue Jul 20, 2020 · 4 comments
Open
4 tasks
Labels
feature New feature or enhancement help wanted PR needed This issue requires a PR to be fixed. If you have time to help, please send a PR.

Comments

@lukasoppermann
Copy link
Owner

lukasoppermann commented Jul 20, 2020

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)
@lukasoppermann lukasoppermann added feature New feature or enhancement help wanted PR needed This issue requires a PR to be fixed. If you have time to help, please send a PR. labels Jul 20, 2020
@mateuszpigula
Copy link
Contributor

Hi @lukasoppermann,
I wanted to do this task, but I have a problem with reproducing the state from your example.
I cannot see the border while dragging the item. I am using basscss.css but still can't see that.

@lukasoppermann
Copy link
Owner Author

Hey @mateuszpigula.

can you not see the border when you clone the repo or also not in the online demo?

@mateuszpigula
Copy link
Contributor

@lukasoppermann in my forked repo. I have merged upstream/master so no differences with the original one.

@lukasoppermann
Copy link
Owner Author

Hmm, weird, so:

  1. Does the example from the repo work? http://lukasoppermann.github.io/html5sortable/index.html
  2. What browser & OS are you using?
  3. You drag an item and it works fine, but you don't have any outline?
  4. Do you get any js issues

If I clone your fork it works fine for me (chrome on mac & safari on mac)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement help wanted PR needed This issue requires a PR to be fixed. If you have time to help, please send a PR.
Projects
None yet
Development

No branches or pull requests

2 participants