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] [Comment Edited] (CB-4547) The menubutton event blocks the next event
Date Wed, 25 Sep 2013 21:49:03 GMT

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

Joe Bowser edited comment on CB-4547 at 9/25/13 9:48 PM:
---------------------------------------------------------

This appears to only be a problem with the soft menu button, which isn't present if you use
the latest create scripts in Cordova 3.0 and higher.  It would actually make sense to add
a menu bar to an app similar to how it works on iOS, or to add an action bar.

I tested this with the Samsung Galaxy Note running Android 4.1, since all other devices just
don't have a menu button to press.
                
      was (Author: bowserj):
    This appears to only be a problem with the soft menu button, which we do away with in
the latest Cordova as per Android guidelines.  It would actually make sense to add a menu
bar to an app similar to how it works on iOS, or to add an action bar.

I tested this with the Samsung Galaxy Note running Android 4.1, since all other devices just
don't have a menu button to press.
                  
> 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
>              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