summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-02-05 16:20:48 +0100
committerChristophe Simonis <chs@odoo.com>2018-02-05 16:20:48 +0100
commiteefca5d492d6f35dd4b063a294b6b8a0a576e83e (patch)
tree0776e0015aaca70d5d71986846391466a12516e4 /addons/web_editor/static/src/js
parent1ed7f219a59a2ff036bcaf72cb423b961a39802c (diff)
parent73610ff99216ff31eedb6c0a587846ce9209e095 (diff)
[MERGE] forward port branch saas-11.1 up to 73610ff9921
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/editor/rte.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js
index 7ad20c0e614..76b1a1dd11b 100644
--- a/addons/web_editor/static/src/js/editor/rte.js
+++ b/addons/web_editor/static/src/js/editor/rte.js
@@ -385,7 +385,15 @@ var RTEWidget = Widget.extend({
} else {
rng = $editable.data('range') || rng;
}
- rng.select();
+ try {
+ // TODO this line might break for unknown reasons. I suppose that
+ // the created range is an invalid one. As it might be tricky to
+ // adapt that line and that it is not a critical one, temporary fix
+ // is to ignore the errors that this generates.
+ rng.select();
+ } catch (e) {
+ console.log('error', e);
+ }
history.recordUndo($editable, event, internal_history);
},
/**