summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/lib/summernote/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-06-15 13:27:17 +0200
committerChristophe Simonis <chs@odoo.com>2018-06-15 13:27:27 +0200
commit73652a0b196b51ec1f9a27880d0b398fb79bfca3 (patch)
tree04e741fefdbb859dffa66a4037da7777ea980476 /addons/web_editor/static/lib/summernote/src
parent8a03563269c3dc55c9c7157494af51e2485f1a14 (diff)
parent50860317ccd2c1b44f873598858a3cff87fa7ea6 (diff)
[MERGE] forward port branch saas-11.3 up to 50860317ccd
Note: 1aacc962620982528a3dfc90d2c1dd0027359375 has been ignored and will be forward-ported later
Diffstat (limited to 'addons/web_editor/static/lib/summernote/src')
-rw-r--r--addons/web_editor/static/lib/summernote/src/js/module/Editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/lib/summernote/src/js/module/Editor.js b/addons/web_editor/static/lib/summernote/src/js/module/Editor.js
index b7ba30bfcd1..99947c346cf 100644
--- a/addons/web_editor/static/lib/summernote/src/js/module/Editor.js
+++ b/addons/web_editor/static/lib/summernote/src/js/module/Editor.js
@@ -628,9 +628,9 @@ define([
}
var anchors = [];
- // ODOO: adding this branch to modify existing anchor
+ // ODOO: adding this branch to modify existing anchor if it fully contains the range
var ancestor_anchor = dom.ancestor(rng.sc, dom.isAnchor);
- if(ancestor_anchor) {
+ if(ancestor_anchor && ancestor_anchor === dom.ancestor(rng.ec, dom.isAnchor)) {
anchors.push($(ancestor_anchor).html(linkText).get(0));
} else if (isTextChanged) {
// Create a new link when text changed.