diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-05 15:59:31 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-05 15:59:31 +0100 |
| commit | 73610ff99216ff31eedb6c0a587846ce9209e095 (patch) | |
| tree | 50a06190d20f9bb70263e7b1d2ff6c34173fb305 /addons | |
| parent | 33bf2fe92222a807b41682c9d9a537cb0f72bf34 (diff) | |
| parent | d130f224329e0db64d9ceccab3c963ca58d487b4 (diff) | |
[MERGE] forward port branch 11.0 up to d130f224329
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/rte.js | 10 |
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 ee0ec7932c0..dd506158b22 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); }, /** |
