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

onkeyup not firing in javascript on Jellybean

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • cordova-android, cordova-js
    • None
    • Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")

    Description

      I've got a dynamic search entry something like this in my index.html:
      -------------------------------------------------------------------
      <script>
      function dosearch(txt) {
      // blah
      console.log("IAmSearching is true.");
      // lots of stuff
      console.log("IAmSearching is false.");
      }
      </script>

      <input id="junk" onkeyup="dosearch(this.value);">
      -------------------------------------------------------------------

      On a Nexus 7 (Jelly Bean 4.1.1), dosearch is only being called when I press <return> with the input active.

      Now, on 4.0.4 (Samsung Galaxy Tab 2 10), dosearch is being called for every keystroke, as intended.

      Note that in the logcats, on Samsung, the webview itself seems to be handling the onkeyup without cordova getting a look in. On the Nexus, it's the opposite.

      Here's a comparison of the relevant bit of the logcats:
      http://pastebin.com/TvgQESb1

      Can anyone tell me why Cordova 2.0 has a problem with keyup events on 4.1.1?

      Feel free to contact me (ken@kencorey.com) if you need confirmation or better logging.

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            kcorey Ken Corey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: