Opened 7 years ago

Closed 4 years ago

#16382 closed defect (worksforme)

auto-rotator does not work in dojo 1.8 or 1.8.1 when loading the toolkit remotely

Reported by: mdarwin Owned by: Adam Peller
Priority: undecided Milestone: 1.11
Component: Dojox Version: 1.8.1
Keywords: Cc: cb1
Blocked By: Blocking:

Description

The dojox.widget.AutoRotator? widget does not work in dojo 1.8 or 1.8.1 when loading the toolkit remotely.

Create a .html file with the below content. Notice the rotator does not work. Change the reference from 1.8.1 to 1.7.1 in the code and notice that it works.

Strangely, the code works fine if you load dojo 1.8.1 from your local web server rather than from google. eg use: <script src="/libs/dojo/dojo.js" djConfig="parseOnLoad: true"></script>


<html> <head> <title>Test Rotator</title> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.1/dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script>

dojo.require("dojox.widget.AutoRotator?"); dojo.require("dojox.widget.rotator.Fade");

</script> </head> <body> <div data-dojo-type="dojox.widget.AutoRotator?" data-dojo-props="transition:'dojox.widget.rotator.crossFade', duration:500" class="rotator">

<div class="pane pane0">Pane 0</div> <div class="pane pane1">Pane 1</div> <div class="pane pane2">Pane 2</div>

</div> </body> </html>

Change History (2)

comment:1 Changed 7 years ago by Adam Peller

Cc: cb1 added

Is this problem specific to the AutoRotator? widget (copying cb1 in case it is) I seem to remember issues running old dojo.require syntax over CDN on newer releases, though that would have changed from 1.6 to 1.7...

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.11
Resolution: worksforme
Status: newclosed

As peller speculated, the issue is using old dojo.require syntax on the CDN. The following example works fine for me:

<!doctype html>
<head>
<title>Test Rotator</title>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js" data-dojo-config="parseOnLoad: true, async: 1"></script>
<script>
require(['dojox/widget/AutoRotator', 'dojox/widget/rotator/Fade', 'dojo/domReady!'], function () {
});

</script>
</head>
<body>
<div data-dojo-type="dojox/widget/AutoRotator" data-dojo-props="transition:'dojox.widget.rotator.crossFade', duration:500" class="rotator">

    <div class="pane pane0">Pane 0</div>
    <div class="pane pane1">Pane 1</div>
    <div class="pane pane2">Pane 2</div>

</div>
</body>
</html>
Note: See TracTickets for help on using tickets.