Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1146

Application exits if back button is pressed after a soft keyboard hide.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • cordova-android
    • None
    • phonegap 2.0.0 on android 2.2 on an olive pad VT-100

    Description

      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 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.)

      ----------EDIT FOR CLARITY-----------------
      Just to state the obvious , the current page when i am doing the above is not the first page in history.
      If i don't show/hide the softkeyboard, the back button works perfectly and it goes back in history.
      ----------EDIT FOR CLARITY-----------------

      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)

      Attachments

        Issue Links

          Activity

            People

              bowserj Joey Robert Bowser
              ajitaranha Ajit Aranha
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: