I have an cordova android app. I've disabled the resizing when the keyboard pops up because the resizing of the content is pretty noticeable by the user and did not want the user experience to suffer.
So I configured the AndroidManifest.xml with:
- android:windowSoftInputMode="adjustPan"
However, with this configuration the keyboard open up and at times cover the input box, so the user can't tell what they are typing.
To remedy this, I use https://github.com/driftyco/ionic-plugin-keyboard a cordova keyboard plugin that triggers keyboard events when the keyboard shows and hides. With the event, I can extract the height of the keyboard and then transform the input box in the Y direction so it's visible.
This is kind of a hack solution and I have to do it for case by case situations.
I imagine that this must be a common problem and that I just haven't found the right material to understand the correct approach.
It would be more ideal if the framework handles this automatically for you. Another possible option is that when the keyboard is triggered, look for the active input box, grab it's coordinates and if it's hidden by the keyboard scroll up the view. I'm just hoping that there is something that does that for me vs. me having to wire it all up.
Any advice appreciated. Thanks, Derek
Update
input field hidden when soft keyboard appears in phonegap provides a workaround. In this code, the keypad will send events when it is showing and when it isn't. I modified the code but the idea is that when you get the event, you look up what element is in focus. From there you can shift the screen based on that. This should solve most cases.