PuruVJ / neodrag

One Draggable to rule them all 💍
https://neodrag.dev
MIT License
1.57k stars 48 forks source link

:bug: touchmove event don't work with neodrag #136

Open buhodev opened 11 months ago

buhodev commented 11 months ago

On my desktop (using a mouse), neodrag behaves flawlessly. However, when I visited the page on my phone, the calculation logic of the touch pointer didn't work. I don't know if I'm doing something wrong or if it is a bug.

Related: https://github.com/PuruVJ/neodrag/pull/134

Reproduction:

  1. Visit https://svelte.dev/repl/d9f2ebce7b934f9a9c509e3148b0cd98?version=4.2.1 from your phone or open it with the mobile emulator in devtools
  2. Go to the preview tab on the Svelte repl to see the demo
  3. Touch the handle and without releasing, move your finger/mouse up or down
  4. See error

Note: If you visit the link from your desktop & then you open the mobile emulator from devtools, you might have to refresh the page so that the isTouchDevice variable updates correctly.

OS: Windows 11 & Android Browser: Chrome Desktop & Android

xk4rimx commented 8 months ago

I'm facing the same issue.

xk4rimx commented 8 months ago

I'm facing the same issue.

Update: In my case, the draggable element was nested in other elements. Moving up the order of the draggable element fixed it.