summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-08-31 16:18:49 +0200
committerChristophe Simonis <chs@odoo.com>2015-08-31 17:23:16 +0200
commit10a417c63db698997730f5d93ca6a6aea5eb9600 (patch)
tree86acd6e7bb44d45eba99fa09ab1b826871e63843 /addons/web_editor/static/src/js/rte.js
parent61d9dddc98e166d193f72d37e31db046a8430cbf (diff)
[FIX] web_editor: don't loose selection when deleting an image
Diffstat (limited to 'addons/web_editor/static/src/js/rte.js')
-rw-r--r--addons/web_editor/static/src/js/rte.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/rte.js b/addons/web_editor/static/src/js/rte.js
index 5b9f52d0c89..9ed88d4ff1d 100644
--- a/addons/web_editor/static/src/js/rte.js
+++ b/addons/web_editor/static/src/js/rte.js
@@ -25,7 +25,7 @@ var History = function History ($editable) {
this.makeSnap = function (event, rng) {
rng = rng || range.create();
- var elEditable = $(rng.sc).closest('.o_editable')[0];
+ var elEditable = $(rng && rng.sc).closest('.o_editable')[0];
if (!elEditable) {
return false;
}