From 0c49049aef8a7ae44d74d361a86dc23054b5bd97 Mon Sep 17 00:00:00 2001 From: hmai Date: Fri, 4 Aug 2023 11:21:19 +0200 Subject: [PATCH] [FIX] web editor: cursor jumps out of blockquote Steps to reproduce: 1. add a paragraph 2. add a blockquote => the cursor will jump in the paragraph This commit fixes a bug detected when inserting a blockquote. The cursor jumps to nearby paragraph on insert, and other issues. The cause of the bug is tied to the fact that we rely on a complex behavior when inserting paragraph related elements (within the insert command). The way to make blockquote behave like the other paragraph related elements is simply to add it to the list as done in this commit. Task-3383441 closes odoo/odoo#134700 X-original-commit: 8195beacbd878c56bc93290bc03665e30667e177 Signed-off-by: David Monjoie (dmo) --- .../static/src/js/editor/odoo-editor/src/utils/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js index 61cab5821e2..0e4fdc5d2c5 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js @@ -1474,6 +1474,7 @@ export const paragraphRelatedElements = [ 'H5', 'H6', 'PRE', + 'BLOCKQUOTE', ]; /**