diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-08-09 19:33:32 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-08-09 19:33:32 +0200 |
| commit | 7717f082c08d6121cd7d2478e14ff855afd6d384 (patch) | |
| tree | 5b26650048ba249f021792c1d4cb5900e7f0f7a4 /addons/web_editor/static/src/js | |
| parent | d3df57bf906b3ff1964d3c96ea6b45950858099c (diff) | |
| parent | af35aea6b0d6ff52126141ab0e3754a0427553fc (diff) | |
[MERGE] forward port branch saas-11.3 up to af35aea6b0d
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({ |
