onDragStart values of direction, delta are oftenly [0, 0]

Author: megaarmosCreated Dec 15, 2024Updated Dec 17, 2024

Describe the bug:

When the onDragStart event is fired, the values for direction and delta are not determined. In rare occasions, they return proper values. Below are the logs when onDragStart is triggered:

onDragStart direction: [0, 0] 
onDragStart delta: [0, 0]

This code is using gestures from @vueuse/gesture. It always works as expected, with the values for direction and delta being determined correctly when onDragStart is fired:

onDragStart direction: [0, -1]
onDragStart delta: [0, -5]

Information:

  • @use-gesture/vanilla: 10.3.1
  • Device: Desktop
  • OS: Windows
  • Browser: Google Chrome

Checklist:

  • I've read the documentation.
  • If this is an issue with drag, I've tried setting touch-action: none to the draggable element.