summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/summernote.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2016-03-09 15:22:47 +0100
committerNicolas Lempereur <nle@odoo.com>2016-03-09 16:01:49 +0100
commit51641d2634e48d07a3279acee405469e5d194e34 (patch)
tree2470664a0b01f75bf6a4f3099e7b9c6dccb11bcc /addons/web_editor/static/src/js/summernote.js
parentb549af8ddf2b30f21b6a3c79e3de8cd7ca6c5595 (diff)
[FIX] web_editor: leave block after two enter
Before 3959afc the `node` tested would be the selection containing node, but since then it may have been a `<br/>` which has some damaging effects: now entering double enter at the end of a list, quote or code block doesn't end this block. Testing the use case corrected by 3959afc, the said change seems to have no effect so this commit reverts it. opw-667618
Diffstat (limited to 'addons/web_editor/static/src/js/summernote.js')
-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 e4d1c5b27c4..00cd04ac16b 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -1062,8 +1062,8 @@ $.summernote.pluginEvents.enter = function (event, editor, layoutInfo) {
}
}
+ var node = dom.node(r.sc);
var exist = r.sc.childNodes[r.so] || r.sc;
- var node = dom.node(exist);
exist = dom.isVisibleText(exist) || dom.isBR(exist) ? exist : dom.hasContentAfter(exist) || (dom.hasContentBefore(exist) || exist);
// table: add a tr