diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-02-05 13:20:39 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-02-05 15:30:18 +0100 |
| commit | d130f224329e0db64d9ceccab3c963ca58d487b4 (patch) | |
| tree | 8db01d40452394eff0b88392f340c682986b5dba /addons/web_editor/static/src/js/editor/rte.js | |
| parent | aed8f4534675eb75b3ef2097d729e9f6fd102cf2 (diff) | |
[FIX] web_editor: resolved failed forward-port
Forward-port https://github.com/odoo/odoo/commit/f5e7b866860436782ade53308da1ff725be1f124
failed for commit https://github.com/odoo/odoo/commit/78a556601e6b1e72c6d1ac776e31588dd2ffa28f
Diffstat (limited to 'addons/web_editor/static/src/js/editor/rte.js')
| -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); }, /** |
