summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-04-09 15:14:20 +0200
committerChristophe Matthieu <chm@odoo.com>2015-04-09 15:14:20 +0200
commit3d8ac2e3df55b2256ea9a0a30a9b08875b3b94e2 (patch)
tree8ec3a5bb563d26b0a7ee5c491acc78da606cae96 /addons/website/static/src/js/website.editor.js
parent2ec254549cd8d7c96dda6d5ea8a24ae7cc1d3f31 (diff)
[FIX] website: snippet editor: if a snippet is dropped near a text node with a previous click, need to get the parent node to trigger the history
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 47df86ed228..21dfc9c61d3 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -1230,7 +1230,7 @@ define(['summernote/summernote'], function () {
rng = $editable.data('range') || rng;
}
if (!rng && $target.length) {
- rng = range.create($target[0],0);
+ rng = range.create($target.closest("*")[0],0);
}
if (rng) {
try {