From 4a5ff7a126aeb0f9e39f62bc7aec007481a34e6a Mon Sep 17 00:00:00 2001 From: guido foegler Date: Sun, 2 Oct 2011 03:51:48 +0200 Subject: [PATCH] [BUGFIX][t3editor] try-catch avoids exception side effect in "template setup". At least in IE9, "if (!this.mirror.editor)" throws an exception in case of "editor" is undefined (depending on browser settings, this may be silent). With "client browser caching" set to an option other than "read always", a first touch on "template setup" is rendered as expected, but any further touch on "template setup" (within the same session) leads to a incorrect display, due to the thrown exception. --- typo3/sysext/t3editor/jslib/t3editor.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/typo3/sysext/t3editor/jslib/t3editor.js b/typo3/sysext/t3editor/jslib/t3editor.js index 7e15f6a..95f3b79 100755 --- a/typo3/sysext/t3editor/jslib/t3editor.js +++ b/typo3/sysext/t3editor/jslib/t3editor.js @@ -203,7 +203,7 @@ T3editor.prototype = { // update the line numbers updateLinenum: function() { // escape if editor is not yet loaded - if (!this.mirror.editor) return; + try { if (!this.mirror.editor) return; } catch(e) { return; } var bodyContentLineCount = this.mirror.lineNumber(this.mirror.lastLine()); disLineCount = this.linenum.childNodes.length; -- 1.7.6.msysgit.0