From a8040999ffb9ae97cde5fc0d57d9f99b575f50d5 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Tue, 7 Jul 2015 18:08:56 +0200 Subject: [PATCH 1/3] [FIX] Destroy the editor properly. This prevents errors like 'this.getWindow(...).$ is undefined' in Firefox after closing a popup containing an editor instance. was opened in a popup window. --- web_ckeditor4/static/src/js/web_ckeditor4.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web_ckeditor4/static/src/js/web_ckeditor4.js b/web_ckeditor4/static/src/js/web_ckeditor4.js index 1969d29ea..809ed6047 100644 --- a/web_ckeditor4/static/src/js/web_ckeditor4.js +++ b/web_ckeditor4/static/src/js/web_ckeditor4.js @@ -199,11 +199,16 @@ openerp.web_ckeditor4 = function(instance) { if(this.editor) { - CKEDITOR.remove(this.editor); this.editor.removeAllListeners(); + this.editor.destroy(); this.editor = null; } }, + destroy: function() + { + this.destroy_content(); + this._super(); + }, destroy_content: function() { this._cleanup_editor(); From a190e20a6584407b4b92244a17bb67de28b54421 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Fri, 10 Jul 2015 18:10:57 +0200 Subject: [PATCH 2/3] [FIX] Include patch to solve referencing the editor's iframe which is cleaned up untimely in x2many popups. https://github.com/ckeditor/ckeditor-dev/pull/200/files --- web_ckeditor4/static/lib/ckeditor/ckeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ckeditor4/static/lib/ckeditor/ckeditor.js b/web_ckeditor4/static/lib/ckeditor/ckeditor.js index 2bedfd2f9..93d1e72e1 100644 --- a/web_ckeditor4/static/lib/ckeditor/ckeditor.js +++ b/web_ckeditor4/static/lib/ckeditor/ckeditor.js @@ -786,7 +786,7 @@ CKEDITOR.env.gecko)e.on("load",b);var f=a.title,h=a.fire("ariaEditorHelpLabel",{ c.docType+''+this._.docTitle+""+h+f+""+a+"";CKEDITOR.env.gecko&&(a=a.replace(/CKEDITOR.env.version&&(a=a.replace(/]*>/,"$&<\!-- cke-content-start --\>")));c='