summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-12-10 14:32:13 +0100
committerChristophe Matthieu <chm@odoo.com>2015-12-10 15:17:44 +0100
commit3c64ee45a1edbea13ad692e788af7b52417281ea (patch)
tree8c350803d6e419326cb8bb22c885ac3302cef973 /addons/web_editor/static/src
parent6cc99df83e9b72436ba5d79b7ad2829d73ec5a2f (diff)
[FIX] web_editor: enter in a p tag empty (when user change with code view) can be raise an exception
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/summernote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index a6f0e4aaa99..14db16a831c 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -1115,7 +1115,7 @@ $.summernote.pluginEvents.enter = function (event, editor, layoutInfo) {
$(node).html(br);
node = br;
} else {
- node = dom.splitTree(last, {'node': r.sc, 'offset': r.so});
+ node = dom.splitTree(last, {'node': r.sc, 'offset': r.so}) || r.sc;
if (!contentBefore) {
var cur = dom.node(dom.lastChild(node.previousSibling));
if (!dom.isBR(cur)) {