Browse Source

[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.
pull/168/head
Stefan Rijnhart 9 years ago
parent
commit
a8040999ff
  1. 7
      web_ckeditor4/static/src/js/web_ckeditor4.js

7
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();

Loading…
Cancel
Save