From 6ab81fe053f83f7f24ef51e4043f97adcee58eec Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Wed, 14 Jul 2021 14:29:02 +0000 Subject: [PATCH] [FIX] web_editor: paste multiline Inserting text that contain multiline does not work. One "\n" is removed. Two "\n" become only one. Task ID: 2602881 closes odoo/odoo#73835 X-original-commit: 89450137653526d9947bc21410cc4163e8b9b440 Signed-off-by: Antoine Guenet --- .../web_editor/static/lib/odoo-editor/src/commands/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js b/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js index 3efb47ad2e9..630c20935ca 100644 --- a/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js +++ b/addons/web_editor/static/lib/odoo-editor/src/commands/commands.js @@ -94,7 +94,7 @@ function insert(editor, data, isText = true) { } else { startNode.after(nodeToInsert); } - if (isShrunkBlock(startNode)) { + if (startNode.tagName !== 'BR' && isShrunkBlock(startNode)) { startNode.remove(); } startNode = nodeToInsert;