onReady bug in dojo 1.9 (specific modules cause ready to not execute)

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

onReady bug in dojo 1.9 (specific modules cause ready to not execute)

mtyson
Apparent bug in Dojo 1.9.

The following code works in all browsers with dojo 1.8.  It works in dojo 1.9 in all browsers, except IE:

        require(["app/App", "dojo/parser"

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/layout/TabContainer"

                 "dijit/Toolbar", "dijit/form/DropDownButton", "dijit/Menu", "dijit/MenuItem", "dijit/form/Button", "dijit/Editor"

                 "dojo/domReady!"], 

function(App, parser) {

alert('BEFORE parse');

            parser.parse();


---- Now, if I remove certain modules from the load, it will work in Dojo 1.9/IE:

// works

require(["dojo/ready", "app/App", "dojo/parser"

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer",  

                 "dijit/Toolbar"

                 "dojo/domReady!"], 

function(App, parser) {

            

//        ready(1001, function(){

alert('BEFORE parse h');

            parser.parse();



--- If I add in the tab container module, for example - it will break, and the alert will never execute.


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

mtyson
This only breaks if async is set to true.


On Tue, May 21, 2013 at 8:13 PM, Matthew Tyson <[hidden email]> wrote:
Apparent bug in Dojo 1.9.

The following code works in all browsers with dojo 1.8.  It works in dojo 1.9 in all browsers, except IE:

        require(["app/App", "dojo/parser"

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/layout/TabContainer"

                 "dijit/Toolbar", "dijit/form/DropDownButton", "dijit/Menu", "dijit/MenuItem", "dijit/form/Button", "dijit/Editor"

                 "dojo/domReady!"], 

function(App, parser) {

alert('BEFORE parse');

            parser.parse();


---- Now, if I remove certain modules from the load, it will work in Dojo 1.9/IE:

// works

require(["dojo/ready", "app/App", "dojo/parser"

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer",  

                 "dijit/Toolbar"

                 "dojo/domReady!"], 

function(App, parser) {

            

//        ready(1001, function(){

alert('BEFORE parse h');

            parser.parse();



--- If I add in the tab container module, for example - it will break, and the alert will never execute.



________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Sebastien Brunot
Hi matthew,

can you get it to fail without requiring your own app/App module ? If not, can you post it to the list in order for us to reproduce the problem ?

Thanks for your help,

Sebastien



From:        Matthew Tyson <[hidden email]>
To:        [hidden email],
Date:        22/05/2013 05:16
Subject:        Re: [Dojo-interest] onReady bug in dojo 1.9 (specific modules cause        ready to not execute)
Sent by:        [hidden email]




This only breaks if async is set to true.


On Tue, May 21, 2013 at 8:13 PM, Matthew Tyson <matthewcarltyson@...> wrote:
Apparent bug in Dojo 1.9.

The following code works in all browsers with dojo 1.8.  It works in dojo 1.9 in all browsers, except IE:

        require(["app/App", "dojo/parser", 

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/layout/TabContainer", 

                 "dijit/Toolbar", "dijit/form/DropDownButton", "dijit/Menu", "dijit/MenuItem", "dijit/form/Button", "dijit/Editor", 

                 "dojo/domReady!"], 

function(App, parser) {

alert('BEFORE parse');

            parser.parse();

---- Now, if I remove certain modules from the load, it will work in Dojo 1.9/IE:

// works

require(["dojo/ready", "app/App", "dojo/parser", 

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer",  

                 "dijit/Toolbar", 

                 "dojo/domReady!"], 

function(App, parser) {

            

//        ready(1001, function(){

alert('BEFORE parse h');

            parser.parse();

--- If I add in the tab container module, for example - it will break, and the alert will never execute.

__________________________________________ ______________
Dojo Toolkit:
http://dojotoolkit.org/
Tutorials:
http://dojotoolkit.org/documentation/
Reference Guide:
http://dojotoolkit.org/reference-guide
API Documentation:
http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit:
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 653.242.306,20 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A

________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Bill Keese-2
FWIW, I tried it without the App module and it works fine on IE9.   dijit/tests/mobile.html (which has async:true) is also working fine for me on IE9.

We're seeing lots of reports of problems with IE9/10 and async:true but no reproducible test cases.

On Wed, May 22, 2013 at 6:12 PM, Sebastien Brunot <[hidden email]> wrote:
Hi matthew,

can you get it to fail without requiring your own app/App module ? If not, can you post it to the list in order for us to reproduce the problem ?

Thanks for your help,

Sebastien



From:        Matthew Tyson <[hidden email]>
To:        [hidden email],
Date:        22/05/2013 05:16
Subject:        Re: [Dojo-interest] onReady bug in dojo 1.9 (specific modules cause        ready to not execute)
Sent by:        [hidden email]




This only breaks if async is set to true.


On Tue, May 21, 2013 at 8:13 PM, Matthew Tyson <[hidden email]> wrote:
Apparent bug in Dojo 1.9.

The following code works in all browsers with dojo 1.8.  It works in dojo 1.9 in all browsers, except IE:

        require(["app/App", "dojo/parser", 

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/layout/TabContainer", 

                 "dijit/Toolbar", "dijit/form/DropDownButton", "dijit/Menu", "dijit/MenuItem", "dijit/form/Button", "dijit/Editor", 

                 "dojo/domReady!"], 

function(App, parser) {

alert('BEFORE parse');

            parser.parse();

---- Now, if I remove certain modules from the load, it will work in Dojo 1.9/IE:

// works

require(["dojo/ready", "app/App", "dojo/parser", 

                 "dijit/layout/ContentPane", "dijit/layout/BorderContainer",  

                 "dijit/Toolbar", 

                 "dojo/domReady!"], 

function(App, parser) {

            

//        ready(1001, function(){

alert('BEFORE parse h');

            parser.parse();

--- If I add in the tab container module, for example - it will break, and the alert will never execute.

__________________________________________ ______________
Dojo Toolkit:
http://dojotoolkit.org/
Tutorials:
http://dojotoolkit.org/documentation/
Reference Guide:
http://dojotoolkit.org/reference-guide
API Documentation:
http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit:
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 653.242.306,20 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

SnowCritter
In reply to this post by mtyson
I'm experiencing the same problem - same symptoms.

In the following code snippet, if the value of "async" is set to "true", then the "alert" message is never displayed in IE 8+. I was re-constructing this particular page from "scratch" adding each "<div>" and it's supporting dojo code one at a time and then testing in both Firefox and IE 9 to see where the failure first manifested itself. The value of "async" was originally set to "true". Everything worked fine until I added the TabContainer functionality, then the "alert" message was not displayed in IE 9. Setting "async" to "false" remedied the situation - just as mtyson indicated.

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<title>Benton County Sheriff's Office</title>

<link rel="stylesheet" href="js/lib/dijit/themes/tundra/tundra.css" media="screen" />
<link rel="stylesheet" href="js/lib/dojo/resources/dojo.css" media="screen" />

<link rel="stylesheet" href="css/site.css" media="screen" />

<script> dojoConfig = { parseOnLoad: false, async: false }; </script></head>
<body class="tundra">
<script src="js/lib/dojo/dojo.js"></script>
<div id="wrapper">
   <div id="borderContainer"
        data-dojo-type="dijit/layout/BorderContainer"
        data-dojo-props="design: 'headline', liveSplitters: true">
       
      <div id="header"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'top'">
      </div> 
     
      <div id="centerPane"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'center'">
           
         <div id="tabContainer"
              data-dojo-type="dijit/layout/TabContainer"
              data-dojo-props="tabPosition: 'top'">
         </div> 
         
      </div> 
     
      <div id="footer"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'bottom'">
         Powered by Apache
      </div> 
   </div> 
</div> 

<script> require(["dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/TabContainer", "dojo/domReady!"], function(parser, bc, cp, tc) { alert("Parsing... "); parser.parse(); }); </script></body>
</html>
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Bill Keese-2
Snowcritter, that works for me, I copied your example to http://bill.dojotoolkit.org/dojo-release-1.9.0/ie2.html, does that link work for you?

I guess it's a timing problem, or maybe a build issue.   Can you make a URL to the test case where the problem reproduces?

On Thu, May 23, 2013 at 1:05 AM, SnowCritter <[hidden email]> wrote:
I'm experiencing the same problem - same symptoms.

In the following code snippet, if the value of "async" is set to "true",
then the "alert" message is never displayed in IE 8+. I was re-constructing
this particular page from "scratch" adding each "<div>" and it's supporting
dojo code one at a time and then testing in both Firefox and IE 9 to see
where the failure first manifested itself. The value of "async" was
originally set to "true". Everything worked fine until I added the
TabContainer functionality, then the "alert" message was not displayed in IE
9. Setting "async" to "false" remedied the situation - just as mtyson
indicated.

/<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<title>Benton County Sheriff's Office</title>

<link rel="stylesheet" href="js/lib/dijit/themes/tundra/tundra.css"
media="screen" />
<link rel="stylesheet" href="js/lib/dojo/resources/dojo.css" media="screen"
/>

<link rel="stylesheet" href="css/site.css" media="screen" />


</head>
<body class="tundra">


<div id="wrapper">
   <div id="borderContainer"
        data-dojo-type="dijit/layout/BorderContainer"
        data-dojo-props="design: 'headline', liveSplitters: true">

      <div id="header"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'top'">
      </div>

      <div id="centerPane"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'center'">

         <div id="tabContainer"
              data-dojo-type="dijit/layout/TabContainer"
              data-dojo-props="tabPosition: 'top'">
         </div>

      </div>

      <div id="footer"
           data-dojo-type="dijit/layout/ContentPane"
           data-dojo-props="region: 'bottom'">
          <images/apache_pb.gif>
      </div>
   </div>
</div>


</body>
</html>/



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/onReady-bug-in-dojo-1-9-specific-modules-cause-ready-to-not-execute-tp3996730p3996751.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

palytsh
This post has NOT been accepted by the mailing list yet.
Hello! I've bumped, that require(["dijit/Menu"]... works in IE with CDN:
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.0/dojo/dojo.js" data-dojo-config="async: true"></script>
 and does not with local copy:
<script src="js/dojo/dojo/dojo.js" data-dojo-config="async: true" ></script>
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

SnowCritter
In reply to this post by Bill Keese-2
Yes, the code snippet I provided does work. Try changing the "async" value to "true" and see what happens.

Unfortunately, I can't provide a link to this page from my place of employ. I'll copy the source and see if I can't get it set up on a personal account outside of work.

Thanks for working on this.
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Bill Keese-2
Oh, sorry, I didn't read your original message carefully enough.   OK, I updated http://bill.dojotoolkit.org/dojo-release-1.9.0/ie2.html to have async:true and indeed, the alert doesn't show up on IE9.   Cool, that's something debuggable.

Note that the file works locally.   Such is the nature of race conditions.

On Fri, May 24, 2013 at 3:10 AM, SnowCritter <[hidden email]> wrote:
Yes, the code snippet I provided does work. Try changing the "async" value to
"true" and see what happens.

Unfortunately, I can't provide a link to this page from my place of employ.
I'll copy the source and see if I can't get it set up on a personal account
outside of work.

Thanks for working on this.



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/onReady-bug-in-dojo-1-9-specific-modules-cause-ready-to-not-execute-tp3996730p3996776.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Bill Keese-2
PS: Actually, there's a workaround that mictay listed in
https://bugs.dojotoolkit.org/ticket/17146#comment:3:

Copy over the template files (dijit/templates, dijit/layout/templates,
dijit/form/templates) from the source distribution
(http://download.dojotoolkit.org/release-1.9.0/dojo-release-1.9.0-src.zip)
to your copy of dojo (and put them in the dijit directory).

No workaround for CDN though (other than not using CDN).

On Sun, May 26, 2013 at 11:57 PM, Bill Keese <[hidden email]> wrote:

> Oh, sorry, I didn't read your original message carefully enough.   OK, I
> updated http://bill.dojotoolkit.org/dojo-release-1.9.0/ie2.html to have
> async:true and indeed, the alert doesn't show up on IE9.   Cool, that's
> something debuggable.
>
> Note that the file works locally.   Such is the nature of race conditions.
>
> On Fri, May 24, 2013 at 3:10 AM, SnowCritter <[hidden email]>
> wrote:
>>
>> Yes, the code snippet I provided does work. Try changing the "async" value
>> to
>> "true" and see what happens.
>>
>> Unfortunately, I can't provide a link to this page from my place of
>> employ.
>> I'll copy the source and see if I can't get it set up on a personal
>> account
>> outside of work.
>>
>> Thanks for working on this.
>>
>>
>>
>> --
>> View this message in context:
>> http://dojo-toolkit.33424.n3.nabble.com/onReady-bug-in-dojo-1-9-specific-modules-cause-ready-to-not-execute-tp3996730p3996776.html
>> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>> ________________________________________________________
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>> Reference Guide: http://dojotoolkit.org/reference-guide
>> API Documentation: http://dojotoolkit.org/api
>>
>> [hidden email]
>> To unsubscribe, visit:
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: onReady bug in dojo 1.9 (specific modules cause ready to not execute)

Bill Keese-2
PS: jeffreym actually mentioned a workaround for CDN in that same
ticket:  use the paths option in dojoConfig to redirect template
directories to a source copy on the same domain.

So, FWIW you can still use dojo from CDN, but you need to copy the
template files locally and tell require() where they are.


On Tue, May 28, 2013 at 8:25 AM, Bill Keese <[hidden email]> wrote:

> PS: Actually, there's a workaround that mictay listed in
> https://bugs.dojotoolkit.org/ticket/17146#comment:3:
>
> Copy over the template files (dijit/templates, dijit/layout/templates,
> dijit/form/templates) from the source distribution
> (http://download.dojotoolkit.org/release-1.9.0/dojo-release-1.9.0-src.zip)
> to your copy of dojo (and put them in the dijit directory).
>
> No workaround for CDN though (other than not using CDN).
>
> On Sun, May 26, 2013 at 11:57 PM, Bill Keese <[hidden email]> wrote:
>> Oh, sorry, I didn't read your original message carefully enough.   OK, I
>> updated http://bill.dojotoolkit.org/dojo-release-1.9.0/ie2.html to have
>> async:true and indeed, the alert doesn't show up on IE9.   Cool, that's
>> something debuggable.
>>
>> Note that the file works locally.   Such is the nature of race conditions.
>>
>> On Fri, May 24, 2013 at 3:10 AM, SnowCritter <[hidden email]>
>> wrote:
>>>
>>> Yes, the code snippet I provided does work. Try changing the "async" value
>>> to
>>> "true" and see what happens.
>>>
>>> Unfortunately, I can't provide a link to this page from my place of
>>> employ.
>>> I'll copy the source and see if I can't get it set up on a personal
>>> account
>>> outside of work.
>>>
>>> Thanks for working on this.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://dojo-toolkit.33424.n3.nabble.com/onReady-bug-in-dojo-1-9-specific-modules-cause-ready-to-not-execute-tp3996730p3996776.html
>>> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>>> ________________________________________________________
>>> Dojo Toolkit: http://dojotoolkit.org/
>>> Tutorials: http://dojotoolkit.org/documentation/
>>> Reference Guide: http://dojotoolkit.org/reference-guide
>>> API Documentation: http://dojotoolkit.org/api
>>>
>>> [hidden email]
>>> To unsubscribe, visit:
>>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>>
________________________________________________________
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest