I am using PhoneGap (Cordovar 2.5) and jQuery Mobile 1.3.0. On iOS, whenever I focus on a text box, the keyboard shows and push up the page, but on Android it doesn't. I have tried to use android:windowSoftInputMode=""
but no success. Please help.
Asked
Active
Viewed 953 times
1

Nguyen Minh Binh
- 23,891
- 30
- 115
- 165
-
possible duplicate of [Android does not correctly scroll on input focus if not body element](http://stackoverflow.com/questions/23757345/android-does-not-correctly-scroll-on-input-focus-if-not-body-element) – Brian Aug 30 '15 at 05:20
1 Answers
1
In any part of you app (js file, of course) pus this script:
if(/Android 4\.[0-3]/.test(navigator.appVersion)){
window.addEventListener("resize", function(){
if(document.activeElement.tagName=="INPUT"){
window.setTimeout(function(){
document.activeElement.scrollIntoViewIfNeeded();
},0);
}
})
}
The answer was in: Android does not correctly scroll on input focus if not body element