adopted-ember-addons / ember-sortable

Sortable UI primitives for Ember.js
https://ember-sortable.netlify.app/
MIT License
298 stars 148 forks source link

Fix: Block drag start while any item is busy & add wait for transition end in test helper `drop` #562

Closed mkszepp closed 5 months ago

mkszepp commented 5 months ago

While added direction grid in PR #560 we have discovered, that the waiting for transitionEnd was not correctly. This has some side-effects in tests, when using with a bigger list of item, because the animation spents more time.

This was the reason, why added tests for direction grid were failed.

This PR fix following bugs

  1. dropend and was already called before all transitions of all items was completed
  2. after dropping a item and taking an other one immediately, brings crazy transition effect and sometime also order was not anymore correct
  3. in tests the drop helper hasn't respected transitionEnd, caused by the other two bugs. Fast reordering like in tests are not working with large lists