Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uptypeerror (undefined) in touch 'end' function #461
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bburdette
Dec 13, 2015
Tested with Chromium Version 45.0.2454.101 (64-bit) and with Firefox nightly 42.0.
And, elm 0.16 with "elm-lang/core": "3.0.0" according to the elm-stuff/exact-dendencies.json
bburdette
commented
Dec 13, 2015
|
Tested with Chromium Version 45.0.2454.101 (64-bit) and with Firefox nightly 42.0. |
bburdette
referenced this issue
Dec 14, 2015
Closed
typeerror exception breaks interface in mouse mode. #2
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bburdette
Jan 2, 2016
For me I fixed it by removing the code that appears to emulate mousemove. Maybe the way to go would be to put this emulation code somewhere else? Or allow deactivating it. bburdette@fc240a3
bburdette
commented
Jan 2, 2016
|
For me I fixed it by removing the code that appears to emulate mousemove. Maybe the way to go would be to put this emulation code somewhere else? Or allow deactivating it. bburdette@fc240a3 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
May 11, 2016
Member
Touch is not handled by core anymore. There is support for http://elm-lang.org/examples/drag stuff at the moment, but it's not super easy for touch yet.
|
Touch is not handled by core anymore. There is support for http://elm-lang.org/examples/drag stuff at the moment, but it's not super easy for touch yet. |
bburdette commentedDec 13, 2015
I've got a project where I have a bunch of SVG controls, which respond to either touch or mouse input. If I use the touch signal (passing it in to the startapp 'inputs') then I get an error after randomly clicking around among the controls. This is using the mouse on my laptop, which isn't a touch device.
The error occurs in the 'end()' function, which is inside Elm.Native.Touch.make. Specifically the var 't' is undefined. The error occurs in the 'if' comparison, "if (localRuntime.timer.now() - t.t < tapTime)".
There is a pull request from this issue https://github.com/elm-lang/core/issues/390 which purports to solve the problem (or a similar problem), but for me the type error still occurs. Pull request: https://github.com/elm-lang/core/pull/400
I gave that a try by manually applying the patch to an html page built with elm-make.
Its not exactly a minimal example. but you can reproduce this error by checking out my project 'oscpad' and running /elm/RunMe.elm with elm-reactor. I may try to find a workaround so for future reference the bug occurred in commit bcef5c3d27066f15642ba56f21a1040fa832256c.