diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-09-23 14:34:26 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-09-23 14:34:26 +0200 |
| commit | 57168a9e90066ed6b3d274d5032a20bef342a00f (patch) | |
| tree | e6af71b6199d1e4bbd808580285242ceb4afde77 /addons/web_editor/static/src/js/summernote.js | |
| parent | 2bbf3c516df41842302c10326fd6bcd14168a89d (diff) | |
| parent | a669433326430caab705ede8d48eecda16d3ee10 (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.js | 4 |
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; } |
