From 8bedf485d65e16bc3614a576c5162579c7f1ae88 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 20 Mar 2013 14:46:28 +0100 Subject: [PATCH] Don't fail TinyMCE cleanup if no current instance is set Bug has been observed in IE8 --- javascript/HtmlEditorField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js index ab672643b..e8e361f8f 100644 --- a/javascript/HtmlEditorField.js +++ b/javascript/HtmlEditorField.js @@ -1360,7 +1360,7 @@ function sapphiremce_cleanup(type, value) { // if we are inserting from a popup back into the editor // add the changed class and update the Content value - if(type == 'insert_to_editor') { + if(type == 'insert_to_editor' && typeof tinyMCE.selectedInstance.editorId !== 'undefined') { var field = jQuery('#' + tinyMCE.selectedInstance.editorId); var original = field.val(); if (original != value) {