MagicTouch icon indicating copy to clipboard operation
MagicTouch copied to clipboard

Fixed a bug where some touch events still performed the default actions.

Open stretchtiberius opened this issue 13 years ago • 3 comments

Fixed a bug where some touch events still performed the default actions. Also, added code to remove the last touch-point visualization after the touchend event.

stretchtiberius avatar Oct 13 '11 13:10 stretchtiberius

Thanks but I don't think your touchend modification is right. You can't clear the list of touches every time there's a touchend because there may be other fingers on the screen... I'm seeing a flickering effect.

borismus avatar Oct 13 '11 18:10 borismus

I see what you are saying. You are correct. It is interesting that I did not see the flickering myself. Perhaps, change the line in the touchend listener: -touches = []; +touches = event.touches;

The most important change I made was to add: event.preventDefault(); on all the listeners. The code did not work otherwise.

I should also mention that I am testing this on an actual touchscreen with the MagicTouch script.

stretchtiberius avatar Oct 14 '11 13:10 stretchtiberius

The point of MagicTouch is to simulate a touch screen when you don't have access to one, though. Not sure that your use case is a valid one, unless I'm misunderstanding something.

borismus avatar Jan 30 '13 00:01 borismus