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 2014/12/29 20:16:32 UTC

tapestry-5 git commit: TAP5-2338: Work around some IE8 wierdness

Repository: tapestry-5
Updated Branches:
  refs/heads/master ff08ad572 -> e71688962


TAP5-2338: Work around some IE8 wierdness

The T5 floating console was always visible since there was an error trying to write to the native console, which simply does not exist in IE8
unless the developer tools are enabled. This fix drops attempts to write to the native console when it is missing. It is then possible to dismiss the
floating console normally.


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

Branch: refs/heads/master
Commit: e7168896299efb68a0ad5bb000b968465bb10c8a
Parents: ff08ad5
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Dec 29 11:16:17 2014 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Dec 29 11:16:17 2014 -0800

----------------------------------------------------------------------
 .../META-INF/modules/t5/core/console.coffee             | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e7168896/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
index d57697e..ab7ccc2 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/console.coffee
@@ -156,10 +156,14 @@ define ["./dom", "underscore", "./bootstrap"],
         if _.isFunction consolefn
           # Use the available native console, calling it like an instance method
           consolefn.call console, message
-        else
-          # And IE just has to be different. The properties of console are callable, like functions,
-          # but aren't proper functions that work with `call()` either.
-          consolefn message
+          return
+
+        # On IE8, the console object appears empty unless debugging tools are enabled.
+        return unless consolefn
+
+        # And IE just has to be different. The properties of console are callable, like functions,
+        # but aren't proper functions that work with `call()` either.
+        consolefn message
 
         return