diff --git a/app-compose/src/main/kotlin/com/pitchedapps/frost/compose/draggable/DragContainer.kt b/app-compose/src/main/kotlin/com/pitchedapps/frost/compose/draggable/DragContainer.kt index 24fd37a0b..7847b1b61 100644 --- a/app-compose/src/main/kotlin/com/pitchedapps/frost/compose/draggable/DragContainer.kt +++ b/app-compose/src/main/kotlin/com/pitchedapps/frost/compose/draggable/DragContainer.kt @@ -107,6 +107,12 @@ private fun Modifier.dragTarget(dragTargetState: DragTargetState): Modifi dragTargetState.isDragging = false } }, + onDragCancel = { + if (dragTargetState.isDragging) { + draggableState.onDragEnd(key) + dragTargetState.isDragging = false + } + } ) } // We still need to draw to track size changes