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 upTouch events outside of container div throws exception #390
Comments
endeavour
changed the title from
Touch events outside of container div throw exception
to
Touch events outside of container div throws exception
Sep 4, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Can you create a short example of this? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
endeavour
commented
Sep 8, 2015
|
Sure, see this: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
endeavour
commented
Sep 8, 2015
|
Run elm-reactor and then browse to bug.html and click on the red div |
eeue56
referenced this issue
Sep 9, 2015
Closed
Fix touches from erroring when running in embedded mode #400
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
eeue56
Sep 9, 2015
Contributor
Looks like the problem is down fact touchstart isn't called, but touchend is when the listener is added to the node Elm is running inside. I've made a PR #400 which should fix this.
A possibly related problem is when you fire touch events onto an element that re-renders itself before you stop touching (i.e trigger touchend), then touchend is never called, meaning until you click again it there will be no signal sent to clear the data. To try this, load the example project up in Chrome, open the dev tools and enable mobile view, with stimulated touch events, and click on the [] in the webpage. I'll make a new issue for that.
|
Looks like the problem is down fact A possibly related problem is when you fire |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
endeavour
commented
Sep 9, 2015
|
Thank you! |
bburdette
referenced this issue
Dec 13, 2015
Closed
typeerror (undefined) in touch 'end' function #461
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
No more |
endeavour commentedSep 4, 2015
Consuming Touch.taps causes an exception to be thrown when an Elm moduile is embedded in an HTML page and you tap (or click) outside the container div.
"Uncaught TypeError: Cannot read property 't' of undefined" occurs in the end(e) function.