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 51698CA8F for ; Fri, 22 Jun 2012 18:56:43 +0000 (UTC) Received: (qmail 76686 invoked by uid 500); 22 Jun 2012 18:56:42 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 76619 invoked by uid 500); 22 Jun 2012 18:56:42 -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 76462 invoked by uid 99); 22 Jun 2012 18:56:42 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 18:56:42 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 9A52014001F for ; Fri, 22 Jun 2012 18:56:42 +0000 (UTC) Date: Fri, 22 Jun 2012 18:56:42 +0000 (UTC) From: "Jesse MacFadyen (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1950465612.44981.1340391402634.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (CB-953) mousedown and mouseup events are fired twice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jesse MacFadyen created CB-953: ---------------------------------- Summary: mousedown and mouseup events are fired twice Key: CB-953 URL: https://issues.apache.org/jira/browse/CB-953 Project: Apache Cordova Issue Type: Bug Components: WP7 Affects Versions: 1.7.0 Reporter: Jesse MacFadyen Assignee: Jesse MacFadyen Fix For: 1.9.0 I have a simple Cordova 1.7.0. test app that just handles mouse events and = logs event target (attached). I found out that mousedown and mouseup events= are fired twice. First time they are fired in code by C# InvokeSimulatedMo= useEvent function and the second time by WebBrowser control itself. That le= ads to event handlers also to be called twice for each event. I found out that the second time WebBrowser fires events because native Tap= event is not prevented. So I added tap handler that prevents event bubblin= g in order to illuminate unnecessary event firing: =20 private void browser_Loaded(object sender, RoutedEventArgs e) { =E2=80=A6 =20 border.Tap +=3D Border_Tap; =E2=80=A6 } =20 void Border_Tap(object sender, GestureEventArgs e) { e.Handled =3D true; } =20 =20 In this case events are fired only once, but I have the following issues: a. After clicking on input field it is highlighted but virtual keyboa= rd is not opened. b. Play button of audio element becomes not clickable. =20 It seems that all events are fired correctly but there are some little diff= erence between system and Cordova events (see below):=20 Cordova generated: Log:"isCordova=3Dtrue; fromElement=3Dnull; layerX=3D0; layerY=3D0; toElemen= t=3Dnull; which=3D1; altKey=3Dfalse; button=3D0; buttons=3D0; clientX=3D233= ; clientY=3D209; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D0; offsetY=3D0= ; pageX=3D233; pageY=3D209; relatedTarget=3D[object HTMLInputElement]; scre= enX=3D233; screenY=3D209; shiftKey=3Dfalse; x=3D0; y=3D0; getModifierState= =3D\nfunction getModifierState() {\n [native code]\n}\n; initMouseEvent= =3D\nfunction initMouseEvent() {\n [native code]\n}\n; detail=3D1; view= =3D[object Window]; initUIEvent=3D\nfunction initUIEvent() {\n [native c= ode]\n}\n; bubbles=3Dtrue; cancelable=3Dtrue; currentTarget=3D[object Windo= w]; defaultPrevented=3Dfalse; eventPhase=3D1; isTrusted=3Dfalse; target=3D[= object HTMLInputElement]; timeStamp=3D1The thread '' (0xf3204da) h= as exited with code 0 (0x0). Log:"isCordova=3Dtrue; fromElement=3Dnull; layerX=3D0; layerY=3D0; toElemen= t=3Dnull; which=3D1; altKey=3Dfalse; button=3D0; buttons=3D0; clientX=3D233= ; clientY=3D209; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D0; offsetY=3D0= ; pageX=3D233; pageY=3D209; relatedTarget=3D[object HTMLInputElement]; scre= enX=3D233; screenY=3D209; shiftKey=3Dfalse; x=3D0; y=3D0; getModifierState= =3D\nfunction getModifierState() {\n [native code]\n}\n; initMouseEvent= =3D\nfunction initMouseEvent() {\n [native code]\n}\n; detail=3D1; view= =3D[object Window]; initUIEvent=3D\nfunction initUIEvent() {\n [native c= ode]\n}\n; bubbles=3Dtrue; cancelable=3Dtrue; currentTarget=3D[object Windo= w]; defaultPrevented=3Dfalse; eventPhase=3D1; isTrusted=3Dfalse; target=3D[= object HTMLInputElement]; timeStamp=3D1Log:"trace end" System: Log:"fromElement=3Dnull; layerX=3D67; layerY=3D20; toElement=3Dnull; which= =3D1; altKey=3Dfalse; button=3D0; buttons=3D1; clientX=3D233; clientY=3D209= ; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D67; offsetY=3D20; pageX=3D233= ; pageY=3D209; relatedTarget=3Dnull; screenX=3D1345; screenY=3D1309; shiftK= ey=3Dfalse; x=3D67; y=3D20; getModifierState=3D\nfunction getModifierState(= ) {\n [native code]\n}\n; initMouseEvent=3D\nfunction initMouseEvent() {= \n [native code]\n}\n; detail=3D1; view=3D[object Window]; initUIEvent= =3D\nfunction initUIEvent() {\n [native code]\n}\n; bubbles=3Dtrue; canc= elable=3Dtrue; currentTarget=3D[object Window]; defaultPrevented=3Dfalse; e= ventPhase=3D1; isTrusted=3Dtrue; target=3D[object HTMLInputElement]; timeSt= amp=3D1338888750791; type=3Dmousedown; Log:"-------------->" Log:"fromElement=3Dnull; layerX=3D67; layerY=3D20; toElement=3Dnull; which= =3D1; altKey=3Dfalse; button=3D0; buttons=3D1; clientX=3D233; clientY=3D209= ; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D67; offsetY=3D20; pageX=3D233= ; pageY=3D209; relatedTarget=3Dnull; screenX=3D1345; screenY=3D1309; shiftK= ey=3Dfalse; x=3D67; y=3D20; getModifierState=3D\nfunction getModifierState(= ) {\n [native code]\n}\n; initMouseEvent=3D\nfunction initMouseEvent() {= \n [native code]\n}\n; detail=3D1; view=3D[object Window]; initUIEvent= =3D\nfunction initUIEvent() {\n [native code]\n}\n; bubbles=3Dtrue; canc= elable=3Dtrue; currentTarget=3D[object Window]; defaultPrevented=3Dfalse; e= ventPhase=3D1; isTrusted=3Dtrue; target=3D[object HTMLInputElement]; timeSt= amp=3D1338888751251; type=3Dmouseup; caThe thread '' (0xe23073a) h= as exited with code 0 (0x0). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira