interaction measurer blocks all interaction on the page in iPad
hellochar opened this issue · comments
3.0.0's refactor to Plottable's interaction manager now make it block all touch inputs on the page in iPad, so e.g. tapping buttons, textfield, etc. are all disabled. Probably should be fixed ASAP
@sixinli for sa
Looks like the core issue is that Mobile Safari will prevent click
events if the mousemove
handler of the same tap modifies the DOM - taken from http://sitr.us/2011/07/28/how-mobile-safari-emulates-mouse-events.html:
It turns out that after any mouseover event handlers run Safari checks the DOM for changes and if the content has changed it skips the mousedown, mouseup, and click events. So these events do not fire.
...
The mousemove event behaves in a similar way: if the DOM has changed after any mousemove handlers are finished running then Mobile Safari skips the remaining events.
Our mousemove
handler always modifies the DOM because we call translator.computePosition which moves the measurementElement around.
So we need to avoid modifying the DOM on mousemove. Possibly #3265 could work here... will continue digging. Also need to see why 2.x worked
Update: Plottable 2.x avoided this issue by using a <rect>
to represent the Translator measurer element, which avoids DOM updates since it's inside an svg the whole time. Going back to that method for the time being
thanks for the update!