summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/wysiwyg/plugin
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-04-05 18:46:10 +0200
committerChristophe Simonis <chs@odoo.com>2019-04-05 18:46:10 +0200
commit3f95b074e959f0f4ac93fbf4048c0c7276f2c17a (patch)
treef4e793da5d83bcd1bd4347f71cb3f45cbc953df3 /addons/web_editor/static/src/js/wysiwyg/plugin
parent1a871d72438c731d08ef10e668b81b4ade900b85 (diff)
parentf2be461f0906ed47306da58c31240014b6239d80 (diff)
[MERGE] forward port branch saas-12.2 up to f2be461f090
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js b/addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js
index 0cb451c100d..3ab6a5f0317 100644
--- a/addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js
+++ b/addons/web_editor/static/src/js/wysiwyg/plugin/keyboard.js
@@ -969,13 +969,13 @@ var KeyboardPlugin = AbstractPlugin.extend({
var pointA = this.context.invoke('HelperPlugin.makePoint', startNode, 0);
pointA = dom.nextPointUntil(pointA, function (point) {
return self.context.invoke('HelperPlugin.isVisibleText', point.node);
- });
+ }) || pointA;
var endNode = $contents.length ? $contents[$contents.length - 1] : unbreakable;
var endOffset = $contents.length ? dom.nodeLength($contents[$contents.length - 1]) : 1;
var pointB = this.context.invoke('HelperPlugin.makePoint', endNode, endOffset);
pointB = dom.prevPointUntil(pointB, function (point) {
return self.context.invoke('HelperPlugin.isVisibleText', point.node);
- });
+ }) || pointB;
range.sc = pointA.node;
range.so = pointA.offset;
range.ec = pointB.node;