- It's sometimes a good idea (eg. if the DOM may change) to add your touchmove/touchend listeners from inside a touchstart listener.
- Touchstart listeners should generally be passive
- It's often reasonable for touchend listeners to call preventDefault to prevent generation of mouse/click events.
I was worried the combined scenario may be broken due to a race condition in passive touch event handling. If the impl thread decides whether or not touchend should be cancelable before it knows about the EventHandlerRegistry change, it may dispatch an uncancelable touchend in this case.
However I'm unable to repro this. Why?
Test page: http://output.jsbin.com/mivojo
Hope to see only touchstart/touchend, but expected to see a "click" (which would be bad).
Tested Chrome Linux 52.0.2723.2 and Android 52.0.2739.2
Comment 1 by dtapu...@chromium.org
, May 18 2016