You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/08/18 02:12:44 UTC

git commit: TAP5-1907: Client exception in IE9 when partial page render introduces stylesheets

Updated Branches:
  refs/heads/5.4-js-rewrite d25c14234 -> 798b78772


TAP5-1907: Client exception in IE9 when partial page render introduces stylesheets


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/798b7877
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/798b7877
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/798b7877

Branch: refs/heads/5.4-js-rewrite
Commit: 798b787722dd23e33c4f190d6d37e0c3c10b740d
Parents: d25c142
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Aug 17 17:12:18 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Aug 17 17:12:18 2012 -0700

----------------------------------------------------------------------
 .../META-INF/modules/core/pageinit.coffee          |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/798b7877/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
index aee0589..bf1850b 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
@@ -46,9 +46,12 @@ define ["_", "core/console", "core/spi", "core/events"],
     addStylesheets = (newStylesheets) ->
       return unless newStylesheets
 
+      # Figure out which stylesheets are loaded; adjust for IE, and especially, IE 9
+      # which can report a stylesheet's URL as null (not empty string).
       loaded = _.chain(document.styleSheets)
       .pluck("href")
       .without("")
+      .without(null)
       .map(rebuildURLOnIE)
 
       insertionPoint = _.find(document.styleSheets, (ss) -> ss.ownerNode.rel is "stylesheet t-ajax-insertion-point")