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 9CEBFD811 for ; Wed, 27 Jun 2012 23:35:45 +0000 (UTC) Received: (qmail 47126 invoked by uid 500); 27 Jun 2012 23:35:45 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 47100 invoked by uid 500); 27 Jun 2012 23:35:45 -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 47087 invoked by uid 99); 27 Jun 2012 23:35:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2012 23:35:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id D935614035F for ; Wed, 27 Jun 2012 23:35:44 +0000 (UTC) Date: Wed, 27 Jun 2012 23:35:43 +0000 (UTC) From: "Jesse MacFadyen (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1843625603.64448.1340840144893.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1950465612.44981.1340391402634.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (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 [ https://issues.apache.org/jira/browse/CB-953?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:all-tabpanel ] Jesse MacFadyen resolved CB-953. -------------------------------- Resolution: Fixed Commit is 769a66be801c57de47cb0e0c301ce76cfbf88f73=20 aka : https://github.com/purplecabbage/incubator-cordova-wp7/commit/769a66be801c5= 7de47cb0e0c301ce76cfbf88f73 =20 > 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 > > Original Estimate: 9h > Remaining Estimate: 9h > > I have a simple Cordova 1.7.0. test app that just handles mouse events an= d logs event target (attached). I found out that mousedown and mouseup even= ts are fired twice. First time they are fired in code by C# InvokeSimulated= MouseEvent function and the second time by WebBrowser control itself. That = leads to event handlers also to be called twice for each event. > I found out that the second time WebBrowser fires events because native T= ap event is not prevented. So I added tap handler that prevents event bubbl= ing 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 keyb= oard 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 di= fference between system and Cordova events (see below):=20 > Cordova generated: > Log:"isCordova=3Dtrue; fromElement=3Dnull; layerX=3D0; layerY=3D0; toElem= ent=3Dnull; which=3D1; altKey=3Dfalse; button=3D0; buttons=3D0; clientX=3D2= 33; clientY=3D209; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D0; offsetY= =3D0; pageX=3D233; pageY=3D209; relatedTarget=3D[object HTMLInputElement]; = screenX=3D233; screenY=3D209; shiftKey=3Dfalse; x=3D0; y=3D0; getModifierSt= ate=3D\nfunction getModifierState() {\n [native code]\n}\n; initMouseEve= nt=3D\nfunction initMouseEvent() {\n [native code]\n}\n; detail=3D1; vie= w=3D[object Window]; initUIEvent=3D\nfunction initUIEvent() {\n [native = code]\n}\n; bubbles=3Dtrue; cancelable=3Dtrue; currentTarget=3D[object Wind= ow]; defaultPrevented=3Dfalse; eventPhase=3D1; isTrusted=3Dfalse; target=3D= [object HTMLInputElement]; timeStamp=3D1The thread '' (0xf3204da) = has exited with code 0 (0x0). > Log:"isCordova=3Dtrue; fromElement=3Dnull; layerX=3D0; layerY=3D0; toElem= ent=3Dnull; which=3D1; altKey=3Dfalse; button=3D0; buttons=3D0; clientX=3D2= 33; clientY=3D209; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D0; offsetY= =3D0; pageX=3D233; pageY=3D209; relatedTarget=3D[object HTMLInputElement]; = screenX=3D233; screenY=3D209; shiftKey=3Dfalse; x=3D0; y=3D0; getModifierSt= ate=3D\nfunction getModifierState() {\n [native code]\n}\n; initMouseEve= nt=3D\nfunction initMouseEvent() {\n [native code]\n}\n; detail=3D1; vie= w=3D[object Window]; initUIEvent=3D\nfunction initUIEvent() {\n [native = code]\n}\n; bubbles=3Dtrue; cancelable=3Dtrue; currentTarget=3D[object Wind= ow]; defaultPrevented=3Dfalse; eventPhase=3D1; isTrusted=3Dfalse; target=3D= [object HTMLInputElement]; timeStamp=3D1Log:"trace end" > System: > Log:"fromElement=3Dnull; layerX=3D67; layerY=3D20; toElement=3Dnull; whic= h=3D1; altKey=3Dfalse; button=3D0; buttons=3D1; clientX=3D233; clientY=3D20= 9; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D67; offsetY=3D20; pageX=3D23= 3; pageY=3D209; relatedTarget=3Dnull; screenX=3D1345; screenY=3D1309; shift= Key=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; whic= h=3D1; altKey=3Dfalse; button=3D0; buttons=3D1; clientX=3D233; clientY=3D20= 9; ctrlKey=3Dfalse; metaKey=3Dfalse; offsetX=3D67; offsetY=3D20; pageX=3D23= 3; pageY=3D209; relatedTarget=3Dnull; screenX=3D1345; screenY=3D1309; shift= Key=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