Opened 10 years ago

Closed 10 years ago

#14471 closed defect (invalid)

GFX surface does not support touch events on Android

Reported by: Damien Mandrioli Owned by: Patrick Ruzand
Priority: high Milestone: tbd
Component: DojoX GFX Version: 1.7.0
Keywords: gfx mobile Cc:
Blocked By: Blocking:


The following mobile sample does not work on Android 2.2 (works on iOS).

<!DOCTYPE HTML> <html>


<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <title>GFX Mobile Sample</title> <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script language="JavaScript?" type="text/javascript">

require(["dojo/ready", "dojox/mobile", "dojox/mobile/parser", "dojox/mobile/compat", "dojox/mobile/deviceTheme", "dojox/gfx"]); dojo.ready(function(){

var surface = dojox.gfx.createSurface(dojo.byId("gfxContent"), 200, 200); surface.createRect({width: 500, height: 500}).setFill("red"); surface.connect("ontouchstart", function(){dojo.byId("message").innerHTML += "START "}); surface.connect("ontouchend", function(){dojo.byId("message").innerHTML += "END "});



</head> <body style="visibility:hidden;">

<div id="myView" data-dojo-type="" selected="true">

<h1 data-dojo-type="">GFX Mobile Sample</h1> <div id="gfxContent"> </div> <div id="message"> </div>




Attachments (1)

test-14471.html (1.4 KB) - added by Patrick Ruzand 10 years ago.
fix the testcase so that it's dojo, amd and gfx compliant.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 10 years ago by Patrick Ruzand

Owner: changed from Eugene Lazutkin to Patrick Ruzand

Changed 10 years ago by Patrick Ruzand

Attachment: test-14471.html added

fix the testcase so that it's dojo, amd and gfx compliant.

comment:2 Changed 10 years ago by Patrick Ruzand

Resolution: invalid
Status: newclosed

(from the reporter: "does not work" here means the touch event handlers are not invoked on Android (so, using canvasEvents), while they are in iOS (svg).

The problem is in the name of the events used in this testcase. The connect should be done on 'touchstart'/'touchend' and not 'ontouchstart/ontouchend'.


Once the events names are fixed, the testcase run the same in android as in iOS.

Note: See TracTickets for help on using tickets.