Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#14651 closed defect (worksforme)

SwapView breaks as soon as you use another method to change views

Reported by: pj16 Owned by: ykami
Priority: high Milestone: tbd
Component: DojoX Mobile Version: 1.7.1
Keywords: SwapView performTransition Cc:
Blocked By: Blocking:

Description

I want to mix SwapView? swipe motions to slide views as well as listitems and buttons that employ view.performTransition(). It seems that SwapView? breaks as soon I use any other method to change the view. The HTML code below illustrates. Is there a workaround?

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd"> <html>

<head>

<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>dojox.mobile Demo</title> <link href="./dojo-release-1.7.0/dojox/mobile/themes/iphone/iphone.css" rel="stylesheet" /> <script type="text/javascript" src="./dojo-release-1.7.0/dojo/dojo.js" djConfig="isDebug:true, parseOnLoad:true"></script> <script type="text/javascript">

Use the lightweight parser dojo.require("dojox.mobile.parser"); Require Dojo mobile dojo.require("dojox.mobile"); dojo.require("dojox.mobile.SwapView?"); Require the compat if the client isn't Webkit-based dojo.requireIf(!dojo.isWebKit,"dojox.mobile.compat");

</script>

</head> <body>

<div dojoType="dojox.mobile.View"> <div id="settings" dojoType="dojox.mobile.SwapView?" selected="true">

<h1 dojoType="dojox.mobile.Heading">Settings</h1> <ul dojoType="dojox.mobile.RoundRectList?">

<li dojoType="dojox.mobile.ListItem?" moveTo="general">

Carrier

</li>

</ul>

</div>

<div id="general" dojoType="dojox.mobile.SwapView?">

<h1 dojoType="dojox.mobile.Heading" back="Settings" moveTo="settings">General</h1> <ul dojoType="dojox.mobile.RoundRectList?">

<li dojoType="dojox.mobile.ListItem?" moveTo="about">

About

</li> <li dojoType="dojox.mobile.ListItem?" rightText="2h 40m" moveTo="about">

Usage

</li>

</ul>

</div>

<div id="about" dojoType="dojox.mobile.SwapView?">

<h1 dojoType="dojox.mobile.Heading" back="General" moveTo="general">About</h1> <h2 dojoType="dojox.mobile.RoundRectCategory?">Generic Mobile Device</h2> <ul dojoType="dojox.mobile.RoundRectList?">

<li dojoType="dojox.mobile.ListItem?" rightText="AcmePhone?">

Network

</li> <li dojoType="dojox.mobile.ListItem?" rightText="AcmePhone?">

Line

</li>

</ul>

</div> </div>

</body>

</html>

Change History (5)

comment:1 Changed 8 years ago by pj16

Launch the sample html, after fixing the directory references, and then use the swipe motion to slide between views. That works nicely. Now, from the first slide, click the list item. That takes you to slide 2 nicely but the swipe motion no longer works. Thanks, PJ

comment:2 Changed 8 years ago by bill

Component: GeneralDojoX Mobile
Owner: set to ykami

comment:3 Changed 8 years ago by ykami

Resolution: worksforme
Status: newclosed

Apologies for this having been out of my radar for some reason. I believe the problem does not exist any longer in the trunk.

comment:4 Changed 7 years ago by stoci

Hi, I didnt catch what is need to solve this problem. Any other comment will be great. Thanks

comment:5 Changed 7 years ago by ykami

Do you mean you still see the problem even in 1.8 or the trunk?
Or are you looking for a workaround for 1.7?

Note: See TracTickets for help on using tickets.