AbortError thrown on fast drag/drop
**Describe the bug**
When quickly dragging and dropping an item an AbortError is thrown which breaks further drag/drop functionality.
**To Reproduce**
Steps to reproduce the behavior:
1. Using <ul {{sortable-group}}> with {{#each items as |item|}} <li {{sortable-item model=item}}>
2. Drag an item quickly and release before animation completes
3. Observe the console error:
```
AbortError: the user aborted a request.
```
**Expected behavior**
Transitions should gracefully cancel or resolve. No uncaught errors should be thrown.
**Screenshots**
<img width="824" height="133" alt="Image" src="https://github.com/user-attachments/assets/4ae79517-ea10-45da-a486-68c8de4d6426" />
**Additional context**
- The DOM node is not removed
- The .is-dropping class is applied
- Transition seems to be interrupted mid-flight
- Seeing in Chrome and Safari
- Happens with both ember-sortable implementations we have in the codebase
- Patching [sortable-item.js](https://github.com/adopted-ember-addons/ember-sortable/blob/3c9c50bb742e784ad2c045451e3cf7fe99102217/addon/src/modifiers/sortable-item.ts#L884) resolves the issue for me locally
```
return transitionPromise;
} catch (e) {
if (e.name === 'AbortError') {
return Promise.resolve();
}
throw e;
}
```
**Versions**
ember-sortable: 5.3.3
ember: 4.4
2 条评论