cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-4547) The menubutton event blocks the next event
Date Wed, 21 Aug 2013 23:17:52 GMT

    [ https://issues.apache.org/jira/browse/CB-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13746996#comment-13746996
] 

Joe Bowser commented on CB-4547:
--------------------------------

This issue sucks, because it only affects Jellybean, and most likely ICS.  I can't reproduce
this on Gingerbread, which tells me that this is a weird Android WebView quirk.  I tried adding
a view.requestFocus to onJsAlert seeing if the focus was the problem, but it still didn't
work.  This probably can't be fixed on our end, but we'll keep this open until we find a work-around.
                
> The menubutton event blocks the next event
> ------------------------------------------
>
>                 Key: CB-4547
>                 URL: https://issues.apache.org/jira/browse/CB-4547
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.9.0, 3.0.0
>         Environment: Compiled in Fedora 17, tested on Android 4.2 LG Optimus G and Galaxy
Note 2
>            Reporter: Jorge Andrés Martínez
>            Assignee: Joe Bowser
>            Priority: Minor
>              Labels: android, event, menu, menubutton
>
> h3. Steps to reproduce
> # Download the latest release of [cordova|https://www.apache.org/dyn/closer.cgi/cordova/cordova-3.0.0-src.zip]
> # Create a new cordova proyect for android with the create script
> # Replace the contents of assets/www/index.html with:
> {code:html|title=index.html} 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
> <html>
>   <head>
>     <title>Cordova Menu Button Example</title>
>     <!-- From: http://docs.phonegap.com/en/3.0.0/cordova_events_events.md.html#menubutton
-->
>     <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
>     <script type="text/javascript" charset="utf-8">
>     function onLoad() {
>         document.addEventListener("deviceready", onDeviceReady, false);
>     }
>     function onDeviceReady() {
>         document.addEventListener("menubutton", onMenuKeyDown, false);
>         document.addEventListener("click", onTap, false);
>     }
>     function onMenuKeyDown(e) {
>     	alert("menu: "+e);
>     }
>     function onTap(e) {
>     	alert("click: "+e);
>     }
>     </script>
>   </head>
>   <body onload="onLoad()">
>   </body>
> </html>
> {code} 
> # Build and install to an Android device
> # Press menu and press ok on the alert several times
> h3. Expected behavior
> The alert("menu") should show up every time menu is pressed
> h3. Actual Result
> The alert shows up like this:
> # menu press: {color:green}It is displayed{color}
> # menu press: {color:green}It is displayed{color}
> # menu press: {color:red}It is not displayed{color}
> # menu press: {color:green}It is displayed{color}
> # menu press: {color:red}It is not displayed{color}
> and so on.
> h3. Another way to reproduce:
> # Run the previous cordova application on Android
> # Press menu and press ok on the alert twice
> # swipe the screen
> # Press menu ({color:green}the alert is displayed{color})
> # swipe the screen
> # Press menu ({color:green}the alert is displayed{color})
> # swipe the screen
> # Press menu ({color:green}the alert is displayed{color})
> and so on....
> # Press menu ({color:green}the alert is displayed{color})
> # Tap the screen  ({color:red}the alert("click") is not displayed{color})
> # Press menu ({color:green}the alert is displayed{color})
> # Tap the screen  ({color:red}the alert("click") is not displayed{color})
> and so on...
> h3. Final thoughts
> When the menu button is pressed the next event is ignored.
> thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message