Mouse doesnt work after touch is used in Pointer.
all the demos in popmotion.io fall under this.
example: https://codepen.io/popmotion/pen/RjBZoe?editors=0010
my environment: Ubuntu, on chrome. dell xps 13(touch enabled)
how to reproduce issue: move the ball with touch enabled screens, and then try to move with mouse.
this case works move with mouse and switch to touch works, and after that only touch works.
The issue seems to be caused by the multitouch function, which does not reset isTouchDevice flag after the interaction finishes. I hot-wired the module and added the reset to the stop function like so:
packages/popmotion/src/input/multitouch/index.ts#L70
return {
stop: () => {
cancelOnFrameUpdate(updatePoint);
updateOnMove.stop();
isTouchDevice = false;
}
};
which works well for me. This is a result of a quick debug, I am not familiar with the internals of the project, so could you (@InventingWithMonster) please look at it? I'll be happy to prepare a PR if that fixes the problem without any side effects.
I think the real issue here are the API:s that's used. I've created a new Popmotion module that's created around the unified Pointer Events API (and which works with polyfills). It's currently successfully deployed on two large Swedish web sites.
Closing this as rethinking events