New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch events triggered by mouse click+move are mutable #248

Closed
grumpyjames opened this Issue May 20, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@grumpyjames

grumpyjames commented May 20, 2015

Hi,

I have been exploring the possibility of writing a little gestures library on top of Touch. Initial testing, by tapping using macbook pro touchpad, proved rather tricky - all the touch events I generated had the same co-ordinates.

The following program reproduces the issue: run it, 'click' (and hold) with the touchpad, and wiggle your finger around. As the pointer moves, all of the events from the past change to match the latest touch's (x,y).

main = S.map show <| foldp (::) [] touches

I think this is caused by lines 115/116 in Native/Touch.js

                root.value[i].x = point._0;
                root.value[i].y = point._1;

...I think that should probably use the nearby 'touch' function. I'll put together a pull request to fix, just wanted to drop this in here in case I am utterly wrong (please let me know if so!)

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 11, 2016

Member

Sorry we did not get to this earlier! The touch library isn't in core anymore though, so in a sense, this problem is solved. We should be getting touch support back in time!

Member

evancz commented May 11, 2016

Sorry we did not get to this earlier! The touch library isn't in core anymore though, so in a sense, this problem is solved. We should be getting touch support back in time!

@evancz evancz closed this May 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment