user847495
user847495

Reputation: 10161

On Android browser, the whole page jumps up and down when typing inside a textbox?

When I first focus on the textbox, the page jumps down (auto scroll).

Then, when I push keys to type, the page keeps jumping (auto scroll) up and down.

Why is that? It's fine on the iPhone and web.

Upvotes: 3

Views: 4327

Answers (3)

twingocerise
twingocerise

Reputation: 139

This can be linked to you z-indexes if you've got absolute and fixed divs: I've written the following rule: a fixed div have to have a higher z-index than ANY absolute div in the page.

More info here: http://java-cerise.blogspot.fr/2012/02/android-browser-jumping-up-and-down.html

Hope this helps.

Upvotes: 0

Alex Grande
Alex Grande

Reputation: 8027

-webkit-transform: none;

on the parent div fixed it for me. Android is buggy :/

But this is only true if you are adding webkit transform to parent divs to fix other android webkit bugs.

This is not a fix if you are using position: fixed. I have no position: fixed elements.

Upvotes: 0

Grace B
Grace B

Reputation: 1406

If a site has a position:fixed; css attribute on an element it is locked to a certain part of the page in reference to the browser window, so opening the keyboard changes the window size and therefore the positions of said elements. If you're writing a site you know will be used via mobile, don't use position:fixed; on inputs!

Upvotes: 2

Related Questions