Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
vauxoo
odoo
Commits
89e8626a
Commit
89e8626a
authored
Jul 24, 2014
by
Jeremy Kersten
Browse files
[FIX] website: catch exception on destroy of ckeditor to allow the modifications to be saved anyway
parent
335e4a8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/website/static/src/js/website.editor.js
View file @
89e8626a
...
...
@@ -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
'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment