diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-12 16:47:12 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-12 16:47:12 +0100 |
| commit | 8962b8ecc2a3e7215802e06eb5c76b0a88f5380f (patch) | |
| tree | 34ec84ebc3249fd9edbfc7a62f6b5e4449845bad /addons/web_editor/static | |
| parent | 38b201abce19e95e2fdeddc1cf020da2cb260c62 (diff) | |
| parent | d35a76ee178102858417a80b781bbabdf6696df6 (diff) | |
[MERGE] forward port branch saas-14 up to d35a76ee178
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/rte.summernote.js | 4 |
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) { |
