You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Matthias Melitzer (Created) (JIRA)" <ji...@apache.org> on 2012/03/21 10:47:38 UTC

[jira] [Created] (TAP5-1882) Ajax doesn't work anymore after inserting inline style in IE9

Ajax doesn't work anymore after inserting inline style in IE9
-------------------------------------------------------------

                 Key: TAP5-1882
                 URL: https://issues.apache.org/jira/browse/TAP5-1882
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.3.3
            Reporter: Matthias Melitzer
            Priority: Critical


We're using a progress spinner (http://fgnass.github.com/spin.js/) which inserts an inline style via JS in our application.
When a ajax response is processed the href attribute of all the stylesheets gets rebuilt if the agent is IE.
The problematic lines are (beginning line 2042 in tapestry.js:

{code:javascript|title=tapestry.js|borderStyle=solid}
addStylesheets : function(stylesheets) {
   if (!stylesheets)
      return;
   
   var _ = T5._;
   var loaded = _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value();
...

rebuildURLIfIE :
   Prototype.Browser.IE ? Tapestry.rebuildURL : T5._.identity, 
{code}

In IE8 the empty/missing href in the inline style tag evaluates to an empty string ("") which is correctly removed by without(""), in IE9 instead it's evaluated to null.
rebuildURLIfIE evaluates to Tapestry.rebuildURL for IE, when a href equals to null an exception is thrown as soon as the path parameter is accessed:

{code:javascript|title=tapestry.js|borderStyle=solid}
rebuildURL : function(path) {
   if (path.match(/^https?:/)) {
      ...
{code}

The issue can be easily fixed by adding *without(null)* above line:
{code:javascript|title=tapestry.js|borderStyle=solid}
   ...
   var loaded = _(document.styleSheets).chain().pluck("href").without("").without(null).map(this.rebuildURLIfIE).value();
   ...
{code}

In FF the problem would be the same as an empty href in the style tag also evaluates to null, still the problem doesn't appear as the attribute is only rebuild for IE.

--
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-1882) Ajax doesn't work anymore after inserting inline style in IE9

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

Ray Nicholus commented on TAP5-1882:
------------------------------------

I'm seeing the same issue when using modernizr js.  I documented it here: http://tapestry.1045711.n5.nabble.com/exception-in-IE-on-ajax-request-td5714077.html
                
> Ajax doesn't work anymore after inserting inline style in IE9
> -------------------------------------------------------------
>
>                 Key: TAP5-1882
>                 URL: https://issues.apache.org/jira/browse/TAP5-1882
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Matthias Melitzer
>            Priority: Critical
>              Labels: Ajax,, Inline, js, style, stylesheet
>
> We're using a progress spinner (http://fgnass.github.com/spin.js/) which inserts an inline style via JS in our application.
> When a ajax response is processed the href attribute of all the stylesheets gets rebuilt if the agent is IE.
> The problematic lines are (beginning line 2042 in tapestry.js:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> addStylesheets : function(stylesheets) {
>    if (!stylesheets)
>       return;
>    
>    var _ = T5._;
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value();
> ...
> rebuildURLIfIE :
>    Prototype.Browser.IE ? Tapestry.rebuildURL : T5._.identity, 
> {code}
> In IE8 the empty/missing href in the inline style tag evaluates to an empty string ("") which is correctly removed by without(""), in IE9 instead it's evaluated to null.
> rebuildURLIfIE evaluates to Tapestry.rebuildURL for IE, when a href equals to null an exception is thrown as soon as the path parameter is accessed:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> rebuildURL : function(path) {
>    if (path.match(/^https?:/)) {
>       ...
> {code}
> The issue can be easily fixed by adding *without(null)* above line:
> {code:javascript|title=tapestry.js|borderStyle=solid}
>    ...
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").without(null).map(this.rebuildURLIfIE).value();
>    ...
> {code}
> In FF the problem would be the same as an empty href in the style tag also evaluates to null, still the problem doesn't appear as the attribute is only rebuild for IE.

--
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-1882) Ajax doesn't work anymore after inserting inline style in IE9

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

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

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship

Yes, fixed as TAP5-1907.
                
> Ajax doesn't work anymore after inserting inline style in IE9
> -------------------------------------------------------------
>
>                 Key: TAP5-1882
>                 URL: https://issues.apache.org/jira/browse/TAP5-1882
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Matthias Melitzer
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: Ajax,, Inline, js, style, stylesheet
>
> We're using a progress spinner (http://fgnass.github.com/spin.js/) which inserts an inline style via JS in our application.
> When a ajax response is processed the href attribute of all the stylesheets gets rebuilt if the agent is IE.
> The problematic lines are (beginning line 2042 in tapestry.js:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> addStylesheets : function(stylesheets) {
>    if (!stylesheets)
>       return;
>    
>    var _ = T5._;
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value();
> ...
> rebuildURLIfIE :
>    Prototype.Browser.IE ? Tapestry.rebuildURL : T5._.identity, 
> {code}
> In IE8 the empty/missing href in the inline style tag evaluates to an empty string ("") which is correctly removed by without(""), in IE9 instead it's evaluated to null.
> rebuildURLIfIE evaluates to Tapestry.rebuildURL for IE, when a href equals to null an exception is thrown as soon as the path parameter is accessed:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> rebuildURL : function(path) {
>    if (path.match(/^https?:/)) {
>       ...
> {code}
> The issue can be easily fixed by adding *without(null)* above line:
> {code:javascript|title=tapestry.js|borderStyle=solid}
>    ...
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").without(null).map(this.rebuildURLIfIE).value();
>    ...
> {code}
> In FF the problem would be the same as an empty href in the style tag also evaluates to null, still the problem doesn't appear as the attribute is only rebuild for IE.

--
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-1882) Ajax doesn't work anymore after inserting inline style in IE9

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

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

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship

Yes, fixed as TAP5-1907.
                
> Ajax doesn't work anymore after inserting inline style in IE9
> -------------------------------------------------------------
>
>                 Key: TAP5-1882
>                 URL: https://issues.apache.org/jira/browse/TAP5-1882
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Matthias Melitzer
>            Assignee: Howard M. Lewis Ship
>            Priority: Critical
>              Labels: Ajax,, Inline, js, style, stylesheet
>
> We're using a progress spinner (http://fgnass.github.com/spin.js/) which inserts an inline style via JS in our application.
> When a ajax response is processed the href attribute of all the stylesheets gets rebuilt if the agent is IE.
> The problematic lines are (beginning line 2042 in tapestry.js:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> addStylesheets : function(stylesheets) {
>    if (!stylesheets)
>       return;
>    
>    var _ = T5._;
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value();
> ...
> rebuildURLIfIE :
>    Prototype.Browser.IE ? Tapestry.rebuildURL : T5._.identity, 
> {code}
> In IE8 the empty/missing href in the inline style tag evaluates to an empty string ("") which is correctly removed by without(""), in IE9 instead it's evaluated to null.
> rebuildURLIfIE evaluates to Tapestry.rebuildURL for IE, when a href equals to null an exception is thrown as soon as the path parameter is accessed:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> rebuildURL : function(path) {
>    if (path.match(/^https?:/)) {
>       ...
> {code}
> The issue can be easily fixed by adding *without(null)* above line:
> {code:javascript|title=tapestry.js|borderStyle=solid}
>    ...
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").without(null).map(this.rebuildURLIfIE).value();
>    ...
> {code}
> In FF the problem would be the same as an empty href in the style tag also evaluates to null, still the problem doesn't appear as the attribute is only rebuild for IE.

--
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-1882) Ajax doesn't work anymore after inserting inline style in IE9

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

Ray Nicholus commented on TAP5-1882:
------------------------------------

I'm seeing the same issue when using modernizr js.  I documented it here: http://tapestry.1045711.n5.nabble.com/exception-in-IE-on-ajax-request-td5714077.html
                
> Ajax doesn't work anymore after inserting inline style in IE9
> -------------------------------------------------------------
>
>                 Key: TAP5-1882
>                 URL: https://issues.apache.org/jira/browse/TAP5-1882
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.3
>            Reporter: Matthias Melitzer
>            Priority: Critical
>              Labels: Ajax,, Inline, js, style, stylesheet
>
> We're using a progress spinner (http://fgnass.github.com/spin.js/) which inserts an inline style via JS in our application.
> When a ajax response is processed the href attribute of all the stylesheets gets rebuilt if the agent is IE.
> The problematic lines are (beginning line 2042 in tapestry.js:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> addStylesheets : function(stylesheets) {
>    if (!stylesheets)
>       return;
>    
>    var _ = T5._;
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value();
> ...
> rebuildURLIfIE :
>    Prototype.Browser.IE ? Tapestry.rebuildURL : T5._.identity, 
> {code}
> In IE8 the empty/missing href in the inline style tag evaluates to an empty string ("") which is correctly removed by without(""), in IE9 instead it's evaluated to null.
> rebuildURLIfIE evaluates to Tapestry.rebuildURL for IE, when a href equals to null an exception is thrown as soon as the path parameter is accessed:
> {code:javascript|title=tapestry.js|borderStyle=solid}
> rebuildURL : function(path) {
>    if (path.match(/^https?:/)) {
>       ...
> {code}
> The issue can be easily fixed by adding *without(null)* above line:
> {code:javascript|title=tapestry.js|borderStyle=solid}
>    ...
>    var loaded = _(document.styleSheets).chain().pluck("href").without("").without(null).map(this.rebuildURLIfIE).value();
>    ...
> {code}
> In FF the problem would be the same as an empty href in the style tag also evaluates to null, still the problem doesn't appear as the attribute is only rebuild for IE.

--
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