[FIX] website: catch exception on destroy of ckeditor to allow the modifications to be saved anyway
This commit is contained in:
parent
335e4a8cc3
commit
89e8626ab0
|
@ -546,7 +546,13 @@
|
|||
observer.disconnect();
|
||||
var editor = this.rte.editor;
|
||||
var root = editor.element.$;
|
||||
editor.destroy();
|
||||
try {
|
||||
editor.destroy();
|
||||
}
|
||||
catch(err) {
|
||||
// Hack to avoid the lost of all changes because ckeditor fails in destroy
|
||||
console.log("Error in editor.destroy() : " + err.toString() + "\n " + err.stack);
|
||||
}
|
||||
// FIXME: select editables then filter by dirty?
|
||||
var defs = this.rte.fetch_editables(root)
|
||||
.filter('.oe_dirty')
|
||||
|
|
Loading…
Reference in New Issue