diff --git a/app/gui2/src/components/widgets/ListWidget.vue b/app/gui2/src/components/widgets/ListWidget.vue index d1ed4334725..5bb0ccf7933 100644 --- a/app/gui2/src/components/widgets/ListWidget.vue +++ b/app/gui2/src/components/widgets/ListWidget.vue @@ -183,11 +183,13 @@ function onDragStart(event: DragEvent, index: number) { const metaMime = encodeMetadataToMime(meta) event.dataTransfer.setData(metaMime, '') - nextTick(() => { + // The code below will remove the item from list; because doing it in the same frame ends drag + // immediately, we need to put it in setTimeout (nextTick is not enough). + setTimeout(() => { updateItemBounds() draggedIndex.value = index dropInfo.value = { meta, position: currentMousePos } - }) + }, 0) } }