impetus icon indicating copy to clipboard operation
impetus copied to clipboard

Multitouch kills Impetus

Open timothyallan opened this issue 8 years ago • 6 comments

I've got an app that has pinch to zoom enabled on a canvas element, and I noticed that my dragging of the canvas (controlled by Impetus), would just stop every now and then after pinch/zooming on my iPhone. No errors, just dead.

After some spelunking I've found that it's partially the onUp function receiving an event.id that is different then the pointer ID and never executing stopTracking(), never setting pointerActive to false, and never registering another onDown event.

I've attached 2 screens of an onMove followed immediately by an onUp which fails. Also, logged the pointerActive, event.id, and pointerID so you can see what's going on.

This doesn't happen all the time, it sometimes takes a few tries of finger pinch zoom mashing, but it happens 100% of the time...well you know what I mean ;)

screen shot 2016-01-08 at 11 03 28 pm screen shot 2016-01-08 at 11 03 54 pm

timothyallan avatar Jan 09 '16 06:01 timothyallan

Experiencing the same issue here. Implementing impetus disallows the zoom on pinch behaviour on touch devies, which I need for accessibility. Is there any workaround yet?

mdings avatar Apr 17 '16 15:04 mdings

Also getting this in Chrome on Windows w/ a multi-touch screen. In our case, impetus always breaks on the first pinch, even if Chrome is in kiosk mode with webpage pinch zoom disabled.

What's weird is that once the pinch is performed, all "move" events received in impetus have the same exact X/Y coodinates (those of the last touch). That is, events are received properly but the event themselves are always stuck at specific X/Y coordinates, in effect freezing impetus completely (can anyone confirm this in other setups?)

The rest of our app still works as expected, and opening Paint and touch drawing is OK (doesn't seem hardware related).

This led me to think that it's a bug in Chrome, which was seemingly confirmed by trying the latest Chrome Canary, which doesn't exhibit this. Impetus continues working after a pinch. However, seeing people having this issue on iOS makes me doubt it's 100% Chrome's fault... Some investigation might be in order!

fortinmike avatar Sep 25 '17 15:09 fortinmike

I am also experiencing this on iOS 10. If i pinch on an element controlled by impetus, impetus will freeze and it seems like all scrolling is frozen hereafter. This happens for me in both Safari, Chrome and Firefox. I can't reproduce the error on an android device. Have anyone found a workaround?

jensHartfelt avatar Jan 09 '18 20:01 jensHartfelt

@jensHartfelt #33 fixes this. This fork contains the fix: https://github.com/Simbioz/impetus

fortinmike avatar Jan 09 '18 20:01 fortinmike

@fortinmike Awesome, thanks! Just tested it, and it seems to be working perfectly!

jensHartfelt avatar Jan 10 '18 08:01 jensHartfelt

Just for the record, the new pull request that fixes this is #44.

fortinmike avatar Dec 03 '18 22:12 fortinmike