Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Browser textarea scrolls all over the place, is unusable

So I've built a nice, shiny HTML5 application that is targeted at mobile Safari, and Android's default browser. The Android versions I'm testing it on are 2.1 and 2.2.

My app has a textarea on one of its pages, and this textarea tends to have a good amount of text in it at times. Its basically a free-form writing field.

This works as expected in iOS. However on Android, as you type, the screen scrolls wildly up and down on every keystroke, often you can't see what it is you're typing as you type, and you get dizzy from all the jumping around. Furthermore, if the content within the textarea exceeds its height, it appears to be impossible to scroll within it.

Don't even get me started on landscape mode. The above issues are even more pronounced there.

This feels like a bug with Android as there really isn't anything fancy about my textarea. I've stripped it down to the bare essentials, and it behaves the same.

Wondering if anyone else has had this much fun with their textareas on Android, and could maybe give some advice, or at least empathize?

It seems that Google has managed to mostly solve this in the Gmail web interface for Android. I'm guessing there's some JS magic going on because my markup/CSS is identical.

like image 895
Mikel Avatar asked Dec 20 '10 12:12

Mikel


1 Answers

SOLUTION: The 3D webkit is broken in Android, this is causing this problem. Make sure you are not using -webkit-transform: translate3d(0, 0, 0); or -webkit-backface-visibility: hidden; on anything related to the inputs. :(

like image 193
Alex Grande Avatar answered Oct 03 '22 19:10

Alex Grande