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

Drop event thrown for no change #46

Open
pndewit opened this issue May 1, 2018 · 0 comments
Open

Drop event thrown for no change #46

pndewit opened this issue May 1, 2018 · 0 comments

Comments

@pndewit
Copy link

pndewit commented May 1, 2018

Using your example project: https://github.com/michaelmalonenz/aurelia-dragula-example

  1. Add a breakpoint, console log, or anything else to notify you (that it has been triggered) on line 32 in welcome.js (so just inside the drop function)
  2. Start it up and submit the name: "test"
  3. Note that the repeater DOM ends with a <!--anchor--> node (after the last <compose> element)
  4. Move the last (right) letter, but do not actually change its position in the list. Just drag it, move it a px or 2 to initiate the drag and release it again.

The drop event should now have fired! Like I said this is because the _initialSibling is set to the <!--anchor--> from step 3 which is then compared to the _currentSibling which is set to null. They are obviously not equal, triggering the drop event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant