Reputation: 629
In my Phonegap-app I handle Android's Back-button with document.addEventListener("backbutton", mysuperawesomecallback, false)
This works fine so far. However, when I'm writing in a textfield the first click on the Back-Button hides the Keyboard and the second quits the app. When I take the focus of the textfield it works normal again.
How can I prevent to quit the app when I'm in a textfield?
Upvotes: 1
Views: 678
Reputation: 115
Add following lines into your main activity which is derived from DroidGap
@Override
public void onBackPressed() {
}
Upvotes: 4
Reputation: 23273
I believe you are actually running into a bug in PhoneGap. We've fixed this issue in PhoneGap 2.2.0 which will be out very soon.
Upvotes: 2