summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-01-12 12:19:28 +0100
committerChristophe Matthieu <chm@odoo.com>2015-01-16 16:38:08 +0100
commit65fee069905d9b7a92239a3ef0b22f153eb84f21 (patch)
tree128fef7b671da52c5ad06ee9377d1313808b089a /addons/website/static/src
parent75341ddcf9544f1e5b7f56951defecd9c278dc18 (diff)
[FIX] summbernote lib: if a content selected with CTRL+a begin by an image, the editor switch to the image editor but the range is not correct. Need to display the image style only for real image edition.
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/website.editor.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 849c31f9dd5..068b1dacfcd 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -278,9 +278,7 @@ define(['summernote/summernote'], function () {
/* hack for image and link editor */
function getImgTarget () {
- var rng = range.create();
- var target = rng.sc.childNodes.length && rng.sc.childNodes[rng.so] || rng.sc;
- return target;
+ return $(".note-control-selection").data('target');
}
eventHandler.editor.padding = function ($editable, sValue) {
var $target = $(getImgTarget());