We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 264d621 commit 9f7217eCopy full SHA for 9f7217e
1 file changed
addon/services/drag-sort.ts
@@ -161,7 +161,12 @@ export default class DragSort extends Service.extend(EventedMixin) {
161
const group = this.group;
162
const draggedItem = this.draggedItem;
163
164
- if (sourceList !== targetList || sourceIndex !== targetIndex) {
+ // Only perform action if targetIndex was set (meaning dragover/dragenter occurred)
165
+ // and the position actually changed
166
+ if (
167
+ targetIndex !== null &&
168
+ (sourceList !== targetList || sourceIndex !== targetIndex)
169
+ ) {
170
// Account for dragged item shifting indexes by one
171
if (sourceList === targetList && targetIndex > sourceIndex) targetIndex--;
172
0 commit comments