diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-10-16 15:15:08 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2017-10-16 16:02:00 +0200 |
| commit | eda976e63dcad01f4b65755f1e20fe695ba16a8c (patch) | |
| tree | d56c2e9daf58e69db7de62bbd2e37f4165026cc2 /addons/web_editor/static/src | |
| parent | 296498fb588614b8ce64da47954faac71eef1751 (diff) | |
[FIX] web_editor: do not break labels' texts into <p/>
When editing the content of a <label/> which has XML branding (first
DOM element which is editable in its hierarchy), a <p/> element was
added inside. This behavior is there to automatically add <p/> elements
in empty editable <div/> / <section/> elements on edition. This should
however not apply on <label/> elements.
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/rte.summernote.js | 2 |
1 files changed, 1 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 df8aae48055..c5a6656ea28 100644 --- a/addons/web_editor/static/src/js/rte.summernote.js +++ b/addons/web_editor/static/src/js/rte.summernote.js @@ -428,7 +428,7 @@ $.summernote.pluginEvents.visible = function (event, editor, layoutInfo) { if (($node.is('[data-oe-type="html"]') || $node.is('[data-oe-field="arch"]')) && $node.hasClass("o_editable") && !$node[0].children.length && - "h1 h2 h3 h4 h5 h6 p b bold i u code sup strong small pre th td".toUpperCase().indexOf($node[0].nodeName) === -1) { + "h1 h2 h3 h4 h5 h6 p b bold i u code sup strong small pre th td label".toUpperCase().indexOf($node[0].nodeName) === -1) { var p = $('<p><br/></p>')[0]; $node.append( p ); range.createFromNode(p.firstChild).select(); |
