mirror of https://github.com/OCA/web.git
[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/2083/head
parent
584d23d6cd
commit
c48629412a
|
@ -199,11 +199,16 @@ openerp.web_ckeditor4 = function(instance)
|
||||||
{
|
{
|
||||||
if(this.editor)
|
if(this.editor)
|
||||||
{
|
{
|
||||||
CKEDITOR.remove(this.editor);
|
|
||||||
this.editor.removeAllListeners();
|
this.editor.removeAllListeners();
|
||||||
|
this.editor.destroy();
|
||||||
this.editor = null;
|
this.editor = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
destroy: function()
|
||||||
|
{
|
||||||
|
this.destroy_content();
|
||||||
|
this._super();
|
||||||
|
},
|
||||||
destroy_content: function()
|
destroy_content: function()
|
||||||
{
|
{
|
||||||
this._cleanup_editor();
|
this._cleanup_editor();
|
||||||
|
|
Loading…
Reference in New Issue