Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of "android:windowSoftInputMode" for a web site?

Tags:

I'm building a web site app that will be used from Android devices. At the moment, the browser squashes the page when the soft keyboard appears. I rather want it to scroll the page up.

I've read that the property android:windowSoftInputMode in AndroidManifest.xml can be used for Android apps, but I'm looking for an equivalent for a web site.

like image 767
Graeme Pyle Avatar asked May 27 '12 13:05

Graeme Pyle


1 Answers

You can reposition the browser when the user focuses on this input

<input name="whatever" id="id" onfocus="window.location.href='#id'; return true;"/>
like image 85
rds Avatar answered Sep 18 '22 18:09

rds