Currently, I am developing an iOS app using phonegap 3.0 and have encountered a particular issue. In my app, there is a window where users are required to enter a promo code.
The problem arises when I click on the input area (see this example) and then press the "ok" button in the HTML, causing the top menu to scroll down to the middle of the screen while the keyboard disappears (as shown in this example). The CSS style for the top bar is as follows:
position: absolute;
top: 0;
All other elements, including the <input>
and <button>
tags, are set to:
position:relative;
I attempted updating the CSS style upon click, but it did not yield the desired results. The only workaround that seemed effective was refreshing the page, which is not very elegant.
I came across a similar solution for Android devices here: PhoneGap: Is there a way to stop the keyboard from resizing the view?
Does anyone have any insights or ideas on how this issue could be resolved?