Skip to content
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

interaction measurer blocks all interaction on the page in iPad #3355

Closed
hellochar opened this issue Jun 2, 2017 · 3 comments
Closed

interaction measurer blocks all interaction on the page in iPad #3355

hellochar opened this issue Jun 2, 2017 · 3 comments

Comments

@hellochar
Copy link
Contributor

hellochar commented Jun 2, 2017

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

@hellochar
Copy link
Contributor Author

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

@hellochar
Copy link
Contributor Author

hellochar commented Jun 27, 2017

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

@sixinli
Copy link

sixinli commented Jun 28, 2017

thanks for the update!

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

No branches or pull requests

2 participants