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

Joe Bowser commented on CB-1574:
--------------------------------

After debugging this, this doesn't seem to make any sense.  On the Galaxy S3, 
the odd numbered menu events are registered by the application, and the even 
numbered events aren't by the onKeyUp and onKeyDown events.  Half time time, we 
don't even go into the onKeyDown or onKeyUp methods on DroidGap OR on 
CordovaWebView, which tells me that this may be an issue with Android itself.

This feels like an Android 4.1 bug, since it doesn't exist on 4.0 or 4.2.  
                
> On Android 4.1 events are only sent on every second menu button press
> ---------------------------------------------------------------------
>
>                 Key: CB-1574
>                 URL: https://issues.apache.org/jira/browse/CB-1574
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.1.0
>            Reporter: Simon MacDonald
>            Assignee: Simon MacDonald
>             Fix For: 2.3.0
>
>
> I want to implement a custom menu in my phonegap app. I have added an 
> eventlistener for the menubutton event.
> When I press the menubutton the first time, it opens the menu. When I press 
> it again, I close the menu.
> Every time after that that I want to open the menu, I have to press the 
> menubutton twice (and to close, I have to press it also twice).
> When I check logcat:
> first press:  
> W/InputMethodManagerService(  315): Window already focused, ignoring focus 
> gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@421c95b8 
> attribute=null
> second press: 
> D/DroidGap(19858): 
> onMessage(onPrepareOptionsMenu,com.android.internal.view.menu.MenuBuilder@41db3150)
> D/CordovaWebView(19858): >>> loadUrlNow()
> D/CordovaLog(19858): MENUBUTTON PRESSED
> D/CordovaLog(19858): file:///android_asset/www/app.js: Line 2393 : MENUBUTTON 
> PRESSED
> I/Web Console(19858): MENUBUTTON PRESSED at 
> file:///android_asset/www/app.js:2393

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

Reply via email to