You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Ken Corey (JIRA)" <ji...@apache.org> on 2012/08/02 20:16:04 UTC
[jira] [Created] (CB-1181) onkeyup not firing in javascript on
Jellybean
Ken Corey created CB-1181:
-----------------------------
Summary: onkeyup not firing in javascript on Jellybean
Key: CB-1181
URL: https://issues.apache.org/jira/browse/CB-1181
Project: Apache Cordova
Issue Type: Bug
Components: Android, CordovaJS
Affects Versions: 2.0.0
Environment: Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")
Reporter: Ken Corey
Assignee: Joe Bowser
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.
--
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
[jira] [Commented] (CB-1181) onkeyup not firing in javascript on
Jellybean
Posted by "Michael Brooks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427509#comment-13427509 ]
Michael Brooks commented on CB-1181:
------------------------------------
Thanks Ken!
> onkeyup not firing in javascript on Jellybean
> ---------------------------------------------
>
> Key: CB-1181
> URL: https://issues.apache.org/jira/browse/CB-1181
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, CordovaJS
> Affects Versions: 2.0.0
> Environment: Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")
> Reporter: Ken Corey
> Assignee: Joe Bowser
>
> 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.
--
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
[jira] [Commented] (CB-1181) onkeyup not firing in javascript on
Jellybean
Posted by "Ken Corey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427572#comment-13427572 ]
Ken Corey commented on CB-1181:
-------------------------------
I haven't tried it with any other key events (keydown, keypress, etc). Is this isolated to keyup?
> onkeyup not firing in javascript on Jellybean
> ---------------------------------------------
>
> Key: CB-1181
> URL: https://issues.apache.org/jira/browse/CB-1181
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, CordovaJS
> Affects Versions: 2.0.0
> Environment: Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")
> Reporter: Ken Corey
> Assignee: Joe Bowser
> Fix For: 2.1.0
>
>
> 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.
--
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
[jira] [Commented] (CB-1181) onkeyup not firing in javascript on
Jellybean
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427575#comment-13427575 ]
Joe Bowser commented on CB-1181:
--------------------------------
It is isolated to keyUp. I already did the same thing to keyDown, which is why the fix was so quick.
> onkeyup not firing in javascript on Jellybean
> ---------------------------------------------
>
> Key: CB-1181
> URL: https://issues.apache.org/jira/browse/CB-1181
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, CordovaJS
> Affects Versions: 2.0.0
> Environment: Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")
> Reporter: Ken Corey
> Assignee: Joe Bowser
> Fix For: 2.1.0
>
>
> 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.
--
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
[jira] [Resolved] (CB-1181) onkeyup not firing in javascript on
Jellybean
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser resolved CB-1181.
----------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
The super.onKeyUp must be called on JB, because the WebView is modifying this onKeyUp. Google has made their WebView far more brittle by doing this, sadly.
> onkeyup not firing in javascript on Jellybean
> ---------------------------------------------
>
> Key: CB-1181
> URL: https://issues.apache.org/jira/browse/CB-1181
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, CordovaJS
> Affects Versions: 2.0.0
> Environment: Android 4.1.1 (Nexus 7), versus 4.0.4 (Samsung Galaxy Tab 2 10")
> Reporter: Ken Corey
> Assignee: Joe Bowser
> Fix For: 2.1.0
>
>
> 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.
--
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