Phonegap KeyboardShrinksView and position fixed on iOS not applying correctly Phonegap KeyboardShrinksView and position fixed on iOS not applying correctly ios ios

Phonegap KeyboardShrinksView and position fixed on iOS not applying correctly


Yeah - this is a pain to deal with right now. Currently there is no real fix to make things like they used to be in iOS. Personally, I currently juggle two different tags in my apps (one for iOS and one for Android) and it gets close to the old behavior on iOS. Here's what I use:

<!-- IOS --> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" />`<!-- ANDROID --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1" />

My config.xml settings are what you'd expect:

<preference name="HideKeyboardFormAccessoryBar" value="true" /><preference name="KeyboardShrinksView" value="false" />

Here are a few links to keep an eye on and to keep bugging (i.e. requesting) that the Cordova folks finally fix it.

Hopefully these links will at least help get you up to date w/the latest info on the keyboardshrink related issues. If anyone else has leads/links on this please do share!


I fixed it by calling this code on every page change - :

    $('input').unbind('focusout');    $(document).on('focusout', 'input', function() {        setTimeout(function() {            window.scrollTo(document.body.scrollLeft, document.body.scrollTop);        }, 500);    });