summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/summernote.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-09-23 14:34:26 +0200
committerChristophe Simonis <chs@odoo.com>2015-09-23 14:34:26 +0200
commit57168a9e90066ed6b3d274d5032a20bef342a00f (patch)
treee6af71b6199d1e4bbd808580285242ceb4afde77 /addons/web_editor/static/src/js/summernote.js
parent2bbf3c516df41842302c10326fd6bcd14168a89d (diff)
parenta669433326430caab705ede8d48eecda16d3ee10 (diff)
[MERGE] forward port of branch saas-6 up to a669433
Diffstat (limited to 'addons/web_editor/static/src/js/summernote.js')
-rw-r--r--addons/web_editor/static/src/js/summernote.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index 6cb3134e72a..59186188881 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -595,9 +595,9 @@ dom.removeBetween = function (sc, so, ec, eo, towrite) {
sc = $("<br/>")[0];
so = 0;
$(ancestor).prepend(sc);
- } else if (before) {
+ } else if (dom.isText(sc)) {
var text = sc.textContent.replace(/[ \t\n\r]+$/, '\u00A0');
- so -= sc.textContent.length - text.length;
+ so = Math.min(so, text.length);
sc.textContent = text;
}