diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-08-07 13:58:20 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-08-07 13:58:20 +0200 |
| commit | d7e2c767ce51ddf112babc5507105da4dc127279 (patch) | |
| tree | a35680f40d9eca32d34660c2ac565401aa61441e /addons/web_editor/static/src/js | |
| parent | 932b22994169fe6d00b1be23656949a94ac46ef0 (diff) | |
| parent | 3513e599a7aa02c7a21ff10b064a2dfe1d3c81d1 (diff) | |
[MERGE] forward port branch 11.0 up to 3513e599a7a
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/transcoder.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/transcoder.js b/addons/web_editor/static/src/js/editor/transcoder.js index 84fe3cf8c93..30d1b73cc30 100644 --- a/addons/web_editor/static/src/js/editor/transcoder.js +++ b/addons/web_editor/static/src/js/editor/transcoder.js @@ -248,6 +248,10 @@ function applyOverDescendants(node, func) { func(node); applyOverDescendants(node, func); } + var $node = $(node); + if (node.nodeName === 'A' && $node.hasClass('btn') && !$node.children().length && $(node).parents('.o_outlook_hack').length) { + node = $(node).parents('.o_outlook_hack')[0]; + } node = node.nextSibling; } } @@ -283,7 +287,7 @@ function classToStyle($editable) { // Outlook if (node.nodeName === 'A' && $target.hasClass('btn') && !$target.hasClass('btn-link') && !$target.children().length) { - var $hack = $('<table class="o_outlook_hack" style="display: inline-table;"><tr><td></td></tr></table>'); + var $hack = $('<table class="o_outlook_hack" style="display: inline-table;vertical-align:middle"><tr><td></td></tr></table>'); $hack.find('td') .attr('height', $target.outerHeight()) .css({ |
