kornelski / slip

Slip.js — UI library for manipulating lists via swipe and drag gestures
BSD 2-Clause "Simplified" License
2.44k stars 213 forks source link

Prevent updating position without target #38

Closed henrikhermansen closed 9 years ago

henrikhermansen commented 9 years ago

When scrolling a list on mobile, Slip attempts to update positions even though no element is grabbed. That's problematic, as we have no target object, so let's just not do that. This fixes #32 . No hard feelings if you deem this solution too hacky, and don't accept it. There might be more appropriate places to stop this behaviour, but this works perfectly and doesn't break anything in my experience.

kornelski commented 9 years ago

It does seem hide the error rather than fix the root cause. If there's no target, then the library shouldn't be in state of dragging a target.

henrikhermansen commented 9 years ago

You're absolutely right, and I agree. As I just mentioned in 32 and explained slightly more in #33 this might be caused by some irrational iOS event firing. This certainly goes beyond my skills to mend properly.

henrikhermansen commented 9 years ago

On second thought, I saw this issue first on Android actually. And I know events are fired as they should there.

mauron85 commented 9 years ago

I have same problem in Chrome for Android. What is the status of this?