I have an activity that displays an HTML form in a WebView. Here's my manifest:
<application
android:allowBackup="true"
android:label="@string/app_name" >
<activity
android:name=".SMFeedbackActivity"
android:label="@string/app_name"
android:screenOrientation="locked"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
and the Activity's layout:
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sm_feedback_webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
When tapping on a text input element within the WebView, the expected adjustResize behavior occurs: the activity resizes to show the software keyboard, while keeping the text input focused and visible. However, if I scroll and then tap any other input element (e.g. a radio button) on the page, the WebView scrolls back to the text input I was editing before.
When I edit the same form in Chrome on the same device, this behavior does not occur. I tap the text field to edit it and can then scroll elsewhere on the page and select other inputs without the page scrolling back to the text input.
The issue appears to be with the Android WebView itself and the software keyboard. Does anyone know how to solve this problem?