Commit 89e8626a authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[FIX] website: catch exception on destroy of ckeditor to allow the modifications to be saved anyway

parent 335e4a8c
......@@ -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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment