| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" /> |
| 6 |
<meta name="apple-mobile-web-app-capable" content="yes" /> |
| 7 |
<title>Test touch events with transition</title> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
uld |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
ould |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
<script type="text/javascript" src="../deviceTheme.js"></script> |
| 25 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true"></script> |
| 26 |
<script type="text/javascript"> |
| 27 |
require([ |
| 28 |
"dojox/mobile/parser", |
| 29 |
"dojo/on", |
| 30 |
"dojo/dom", |
| 31 |
"dojo/touch", |
| 32 |
"dojox/mobile", |
| 33 |
"dojox/mobile/compat", |
| 34 |
"dojo/domReady!" |
| 35 |
], function(parser, on, dom, touch) { |
| 36 |
parser.parse(); |
| 37 |
var myElement = dom.byId("div1"); |
| 38 |
on(myElement, "click", function(evt) { |
| 39 |
dom.byId("div1").innerHTML = "last touch timestamp: " |
| 40 |
+ (new Date()).getTime(); |
| 41 |
}); |
| 42 |
}); |
| 43 |
</script> |
| 44 |
</head> |
| 45 |
|
| 46 |
<body style="visibility: hidden;"> |
| 47 |
<div id="home" data-dojo-type="dojox/mobile/View"> |
| 48 |
<h1 id="homeH1" data-dojo-type="dojox/mobile/Heading">Home</h1> |
| 49 |
<ul id="homeUL" data-dojo-type="dojox/mobile/EdgeToEdgeList"> |
| 50 |
<li id="homeLI1" data-dojo-type="dojox/mobile/ListItem" data-dojo-props="moveTo: '#view1'">View 1</li> |
| 51 |
<li id="homeLI2" data-dojo-type="dojox/mobile/ListItem" data-dojo-props="moveTo: '#view2'">View 2</li> |
| 52 |
</ul> |
| 53 |
<div> |
| 54 |
This test aims to check the behavior of a Touch event during a |
| 55 |
transition.<hr /> |
| 56 |
<b>Test case #1</b><br /> |
| 57 |
From the "Home" view, whatever the area of the list item "View1" |
| 58 |
that you touch, you should transition to the view "View1" without |
| 59 |
the keypad focused on the input field.<hr /> |
| 60 |
<b>Test case #2</b><br /> |
| 61 |
From the "Home" view, whatever the area of the list item "View2" |
| 62 |
that you touch, you should transition to the view "View2" without |
| 63 |
altering the value under the item "ListItem B". |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
<div id="view1" data-dojo-type="dojox/mobile/View"> |
| 67 |
<h1 id="view1H1" data-dojo-type="dojox/mobile/Heading" data-dojo-props="moveTo: '#home', back: 'Home'">View1</h1> |
| 68 |
<input id="view1INPUT" type="text" placeholder="input field..." /> |
| 69 |
<ul id="view1UL" data-dojo-type="dojox/mobile/EdgeToEdgeList"> |
| 70 |
<li id="view1LIA" data-dojo-type="dojox/mobile/ListItem">ListItem A</li> |
| 71 |
</ul> |
| 72 |
</div> |
| 73 |
<div id="view2" data-dojo-type="dojox/mobile/View"> |
| 74 |
<h1 id="view2H1" data-dojo-type="dojox/mobile/Heading" data-dojo-props="moveTo: '#home', back: 'Home'">View2</h1> |
| 75 |
<ul id="view2UL" data-dojo-type="dojox/mobile/EdgeToEdgeList"> |
| 76 |
<li id="view2LIB" data-dojo-type="dojox/mobile/ListItem">ListItem B</li> |
| 77 |
</ul> |
| 78 |
<div id="div1" style="font-size: 24pt; background-color: rgb(128, 128, 255)"> |
| 79 |
<span>Touch me!</span> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
</body> |
| 83 |
</html> |