* Fixed bug #7852: JS error raised in IE7 when closing htmlArea RTE
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 14 Mar 2008 00:12:04 +0000 (00:12 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 14 Mar 2008 00:12:04 +0000 (00:12 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3420 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 489e62e..da1e69c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-03-13  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #7851: htmlArea RTE causes memory leaks in IE
+       * Fixed bug #7852: JS error raised in IE7 when closing htmlArea RTE
 
 2008-03-12  Stanislas Rolland  <typo3@sjbr.ca>
 
index f0bb894..dac94b5 100644 (file)
@@ -1,6 +1,7 @@
 2008-03-13  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #7851: htmlArea RTE causes memory leaks in IE
+       * Fixed bug #7852: JS error raised in IE7 when closing htmlArea RTE
 
 2008-03-12  Stanislas Rolland  <typo3@sjbr.ca>
 
index 312555a..bd717b9 100644 (file)
@@ -3607,9 +3607,11 @@ HTMLArea.Dialog = HTMLArea.Base.extend({
         */
        close : function () {
                if (this.dialogWindow) {
-                       if (this.dialogWindow.openedDialog) {
-                               this.dialogWindow.openedDialog.close();
-                       }
+                       try {
+                               if (this.dialogWindow.openedDialog) {
+                                       this.dialogWindow.openedDialog.close();
+                               }
+                       } catch(e) { }
                        this.releaseEvents();
                        HTMLArea.Dialog[this.plugin.name] = null;
                        if (!this.dialogWindow.closed) {
@@ -3707,15 +3709,19 @@ HTMLArea.Dialog = HTMLArea.Base.extend({
        releaseEvents : function() {
                if (this.dialogWindow) {
                        HTMLArea._removeEvent(this.dialogWindow, "unload", this.unloadFunctionReference);
-                       if (this.dialogWindow.document) {
-                               HTMLArea._removeEvent(this.dialogWindow.document, "keypress", this.escapeFunctionReference);
-                       }
-                       if (this.dialogWindow.opener && !this.dialogWindow.opener.closed) {
-                               HTMLArea._removeEvent(this.dialogWindow.opener, "unload", this.unloadFunctionReference);
-                               if (HTMLArea.is_gecko) {
-                                       this.releaseFocus(this.dialogWindow.opener);
+                       try {
+                               if (this.dialogWindow.document) {
+                                       HTMLArea._removeEvent(this.dialogWindow.document, "keypress", this.escapeFunctionReference);
                                }
-                       }
+                       } catch(e) { }
+                       try {
+                               if (this.dialogWindow.opener && !this.dialogWindow.opener.closed) {
+                                       HTMLArea._removeEvent(this.dialogWindow.opener, "unload", this.unloadFunctionReference);
+                                       if (HTMLArea.is_gecko) {
+                                               this.releaseFocus(this.dialogWindow.opener);
+                                       }
+                               }
+                       } catch(e) { }
                }
                if (HTMLArea.is_gecko && this.plugin.editor._iframe.contentWindow) {
                        HTMLArea._removeEvent(this.plugin.editor._iframe.contentWindow, "unload", this.unloadFunctionReference);