popmotion icon indicating copy to clipboard operation
popmotion copied to clipboard

Mouse doesnt work after touch is used in Pointer.

Open gshireesh opened this issue 8 years ago • 3 comments

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.

gshireesh avatar Mar 20 '18 09:03 gshireesh

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.

zefj avatar May 11 '18 10:05 zefj

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.

voxpelli avatar Aug 27 '18 10:08 voxpelli

Closing this as rethinking events

mattgperry avatar Jan 21 '20 11:01 mattgperry