I came here because of a problem with the back button inside the text field ( input or textarea ) in the Cordova / PhoneGap application, which does not cause normal behavior (in my case it does not work my javascript handler).
Unfortunately, the above CSS solution does not work on Android 2.3.
And the chosen solution, which overrides the event in Java, is not enough for me, because I need to run the JS handler, and not return to the web view. In addition, this solution overrides Cordoba's default behavior, which is not best practice as it loses other built-in functions.
So, what I did (and it worked) redefined the KeyUp event as above, but instead of redefining it, I just called the handler in appVIew (which is the Cordoba implementation).
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { return appView.onKeyUp(keyCode, event); }
rachel
source share