Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F39CD340 for ; Wed, 3 Oct 2012 14:00:16 +0000 (UTC) Received: (qmail 78015 invoked by uid 500); 3 Oct 2012 14:00:16 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 77965 invoked by uid 500); 3 Oct 2012 14:00:16 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 77791 invoked by uid 99); 3 Oct 2012 14:00:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 14:00:15 +0000 Date: Thu, 4 Oct 2012 01:00:15 +1100 (NCT) From: "Simon MacDonald (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1800067108.159048.1349272815917.JavaMail.jiratomcat@arcas> In-Reply-To: <1681304166.155570.1349203028163.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CB-1574) On Android 4.x events are only sent on every second menu button press MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-1574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468570#comment-13468570 ] Simon MacDonald commented on CB-1574: ------------------------------------- I can reproduce this on all my 4.1 devices. Sadly, I don't know if there is much we can do about it. Here is the logs from my first key down on the menu button: D/CordovaWebView( 3100): In onKeyPreIme with key code = 82 D/CordovaWebView( 3100): In onKeyDown with key code = 82 D/DroidGap( 3100): onMessage(onPrepareOptionsMenu,com.android.internal.view.menu.MenuBuilder@426122a0) D/CordovaWebView( 3100): In onKeyPreIme with key code = 82 D/CordovaWebView( 3100): In onKeyUp with key code = 82 then when I click it a second time: W/InputMethodManagerService( 397): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42a18560 attribute=null As you can see the key handlers are never called. I need to look into that method in DroidGap a bit more but I'm off to a meeting. > On Android 4.x 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.2.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