Ajit Aranha created CB-1146: ------------------------------- Summary: Application exits if back button is pressed after a soft keyboard hide. Key: CB-1146 URL: https://issues.apache.org/jira/browse/CB-1146 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 2.0.0 Environment: phonegap 2.0.0 on android 2.2 on an olive pad VT-100 Reporter: Ajit Aranha Assignee: Joe Bowser
The back button normally cause CordovaWebView.onKeyUp to be called which typically either dispatches the event to javascript or calls backHistory(). However if the softkeyboard is displayed and then hidden, and the android back button is then pressed onKeyUp is never called, and the application exits instead. (In this case i click on a html text input and either click back on the page or press android back button to hide the keyboard.Then i press the android back button to go to the previous page.) The log is as follows: 07-27 10:16:51.627: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:51.627: V/SoftKeyboardDetect(11190): Old Height = 455 07-27 10:16:51.627: V/SoftKeyboardDetect(11190): Height = 173 07-27 10:16:51.627: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:51.627: V/SoftKeyboardDetect(11190): Width = 800 ---keyboard shown event---- 07-27 10:16:52.207: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:52.207: V/SoftKeyboardDetect(11190): Old Height = 173 07-27 10:16:52.207: V/SoftKeyboardDetect(11190): Height = 173 07-27 10:16:52.207: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:52.207: V/SoftKeyboardDetect(11190): Width = 800 07-27 10:16:52.207: D/SoftKeyboardDetect(11190): Ignore this event 07-27 10:16:53.357: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:53.357: V/SoftKeyboardDetect(11190): Old Height = 173 07-27 10:16:53.357: V/SoftKeyboardDetect(11190): Height = 173 07-27 10:16:53.357: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:53.357: V/SoftKeyboardDetect(11190): Width = 800 07-27 10:16:53.357: D/SoftKeyboardDetect(11190): Ignore this event 07-27 10:16:53.517: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:53.527: V/SoftKeyboardDetect(11190): Old Height = 173 07-27 10:16:53.527: V/SoftKeyboardDetect(11190): Height = 455 07-27 10:16:53.527: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:53.527: V/SoftKeyboardDetect(11190): Width = 800 --keyboard hide event--- 07-27 10:16:54.297: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:54.297: V/SoftKeyboardDetect(11190): Old Height = 455 07-27 10:16:54.297: V/SoftKeyboardDetect(11190): Height = 455 07-27 10:16:54.297: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:54.297: V/SoftKeyboardDetect(11190): Width = 800 07-27 10:16:54.297: D/SoftKeyboardDetect(11190): Ignore this event 07-27 10:16:55.357: W/KeyCharacterMap(11190): Can't open keycharmap file 07-27 10:16:55.357: W/KeyCharacterMap(11190): Error loading keycharmap file '/system/usr/keychars/PANJIT_Touchscreen.kcm.bin'. hw.keyboards.65537.devname='PANJIT Touchscreen' 07-27 10:16:55.357: W/KeyCharacterMap(11190): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 07-27 10:16:55.487: D/CordovaWebView(11190): >>> loadUrlNow() 07-27 10:16:55.547: V/SoftKeyboardDetect(11190): We are in our onMeasure method 07-27 10:16:55.547: V/SoftKeyboardDetect(11190): Old Height = 455 07-27 10:16:55.547: V/SoftKeyboardDetect(11190): Height = 455 07-27 10:16:55.547: V/SoftKeyboardDetect(11190): Old Width = 800 07-27 10:16:55.547: V/SoftKeyboardDetect(11190): Width = 800 07-27 10:16:55.547: D/SoftKeyboardDetect(11190): Ignore this event 07-27 10:16:55.787: W/IInputConnectionWrapper(11190): showStatusIcon on inactive InputConnection ----android back button pressed application exits----- 07-27 10:16:56.157: D/DroidGap(11190): onDestroy() 07-27 10:16:56.157: D/CordovaWebView(11190): >>> loadUrlNow() 07-27 10:16:56.157: D/CordovaWebView(11190): >>> loadUrlNow() 07-27 10:16:56.197: D/DroidGap(11190): onMessage(onPageStarted,about:blank) 07-27 10:16:56.287: D/Cordova(11190): onPageFinished(about:blank) 07-27 10:16:56.287: D/DroidGap(11190): onMessage(onPageFinished,about:blank) 07-27 10:16:56.287: D/DroidGap(11190): onMessage(exit,null) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira