Skip to content

Commit

Permalink
fix(drop): reset currently dragged node
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed May 26, 2024
1 parent 56cc30d commit 07c0677
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/drop-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ export class DropStrategy<K> implements Strategy {
area.container.addEventListener('drop', async event => {
if (!this.current) return

this.area.area.setPointerFrom(event)
this.drop(this.current(), this.area.area.pointer)
try {
this.area.area.setPointerFrom(event)
this.drop(this.current(), this.area.area.pointer)
} finally {
delete this.current
}
})
}

Expand Down

0 comments on commit 07c0677

Please sign in to comment.