You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (Created) (JIRA)" <ji...@apache.org> on 2011/10/27 20:26:32 UTC

[jira] [Created] (TAP5-1731) Dynamic loading of JavaScript libraries is broken in IE

Dynamic loading of JavaScript libraries is broken in IE
-------------------------------------------------------

                 Key: TAP5-1731
                 URL: https://issues.apache.org/jira/browse/TAP5-1731
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3
            Reporter: Howard M. Lewis Ship
            Priority: Critical


Problem is in this code:

    addScripts : function(scripts, callback) {

        var _ = T5._;

        var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();

        var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
            function (nextCallback, scriptURL) {
                return function() {
                    this.loadScript(scriptURL, nextCallback);
                }
            }, callback).value();

        // Kick if off with the callback that loads the first script:

        topCallback.call(this);
    },

In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is broken in IE

Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137378#comment-13137378 ] 

Howard M. Lewis Ship commented on TAP5-1731:
--------------------------------------------

Odd, this reproduced easily for my client's project, but I'm having trouble getting it to do so for the Tapestry integration test suite.
                
> Dynamic loading of JavaScript libraries is broken in IE
> -------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: ie, javascript
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1731.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3
         Assignee: Howard M. Lewis Ship
    
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is broken in IE

Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137378#comment-13137378 ] 

Howard M. Lewis Ship commented on TAP5-1731:
--------------------------------------------

Odd, this reproduced easily for my client's project, but I'm having trouble getting it to do so for the Tapestry integration test suite.
                
> Dynamic loading of JavaScript libraries is broken in IE
> -------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: ie, javascript
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1731:
---------------------------------------

    Priority: Major  (was: Critical)
     Summary: Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)  (was: Dynamic loading of JavaScript libraries is broken in IE)
    
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is broken in IE

Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137404#comment-13137404 ] 

Howard M. Lewis Ship commented on TAP5-1731:
--------------------------------------------

Is suspect this is caused by my client's use of ExtJS, since it doesn't reproduce on a "vanilla" Tapestry stack.
                
> Dynamic loading of JavaScript libraries is broken in IE
> -------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: ie, javascript
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137535#comment-13137535 ] 

Hudson commented on TAP5-1731:
------------------------------

Integrated in tapestry-trunk-freestyle #613 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/613/])
    TAP5-1731: Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1189944
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

                
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is broken in IE

Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137404#comment-13137404 ] 

Howard M. Lewis Ship commented on TAP5-1731:
--------------------------------------------

Is suspect this is caused by my client's use of ExtJS, since it doesn't reproduce on a "vanilla" Tapestry stack.
                
> Dynamic loading of JavaScript libraries is broken in IE
> -------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: ie, javascript
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1731:
---------------------------------------

    Priority: Major  (was: Critical)
     Summary: Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)  (was: Dynamic loading of JavaScript libraries is broken in IE)
    
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1731.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.3
         Assignee: Howard M. Lewis Ship
    
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1731) Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137535#comment-13137535 ] 

Hudson commented on TAP5-1731:
------------------------------

Integrated in tapestry-trunk-freestyle #613 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/613/])
    TAP5-1731: Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)

hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1189944
Files : 
* /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

                
> Dynamic loading of JavaScript libraries is sometimes broken in IE (in rare cases)
> ---------------------------------------------------------------------------------
>
>                 Key: TAP5-1731
>                 URL: https://issues.apache.org/jira/browse/TAP5-1731
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>              Labels: ie, javascript
>             Fix For: 5.3
>
>
> Problem is in this code:
>     addScripts : function(scripts, callback) {
>         var _ = T5._;
>         var loaded = _(document.scripts).chain().pluck("src").without("").map(this.rebuildURLIfIE).value();
>         var topCallback = _(scripts).chain().map(Tapestry.rebuildURL).difference(loaded).reverse().reduce(
>             function (nextCallback, scriptURL) {
>                 return function() {
>                     this.loadScript(scriptURL, nextCallback);
>                 }
>             }, callback).value();
>         // Kick if off with the callback that loads the first script:
>         topCallback.call(this);
>     },
> In the nested callback, the "this" variable is not set to the right value, at least not inside ie.  Need to fully qualify (Tapestry.ScriptLoader.loadScript()) or other bind this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira