summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-01-12 16:16:51 +0100
committerChristophe Simonis <chs@odoo.com>2018-01-12 16:16:51 +0100
commitd35a76ee178102858417a80b781bbabdf6696df6 (patch)
tree226a9ca896908117f3d257427f5eecc57d211cc8 /addons/web_editor/static/src
parente671cdcc444e86f9ed413c33017b9c94e00d13d0 (diff)
parentd76237e038ac379ae96e2c72848a013731c3de03 (diff)
[MERGE] forward port branch 10.0 up to d76237e038a
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/rte.summernote.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js
index 866d0d68e84..5f28c9510bb 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -398,7 +398,9 @@ eventHandler.modules.imageDialog.showImageDialog = function ($editable) {
if (r.sc.tagName && r.sc.childNodes.length) {
r.sc = r.sc.childNodes[r.so];
}
- new widgets.MediaDialog(null, {}, $editable, dom.isImg(r.sc) ? r.sc : null).open();
+ new widgets.MediaDialog(null, {}, $editable, $(r.sc).parents().addBack().filter(function (i, el) {
+ return dom.isImg(el);
+ })[0]).open();
return new $.Deferred().reject();
};
$.summernote.pluginEvents.alt = function (event, editor, layoutInfo, sorted) {