Tuesday, 9 June 2015

Untappable areas with Android 4.x and Phonegap

I came across a problem today while using jQuery to hide one div and show another in its place. The touchable elements on the revealed (buttons, input fields) weren't responding to touch. I found on SO that adding the following style to the problem div fixes the problem:
.androidpaintfix {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0, 0, 0);
}
If you're doing this to a div that needs to be hidden then you need to do it dynamically in JS like so:
$("#formLogin").addClass('androidpaintfix');

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!