From 12f2cd2d34e0e0dbef4d60a12334e2dff4aa292e Mon Sep 17 00:00:00 2001 From: vishal padhiyar Date: Fri, 9 Sep 2022 11:31:41 +0000 Subject: [PATCH] [FIX] web_editor: stuck after manual link creation Before this commit: When we try to create link manually and try to press enter cursor gets stuck. After this commit: Now when we create link manually and press enter cursor moves to next line. Task-2745129 closes odoo/odoo#105968 X-original-commit: 4d14fa559b2ffcb768fa0a0a42b9b9eb2703a050 Signed-off-by: David Monjoie (dmo) --- .../static/src/js/editor/odoo-editor/src/OdooEditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js index 05b2822d1ef..236bfee3a43 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js @@ -3127,6 +3127,7 @@ export class OdooEditor extends EventTarget { match.length, ); } + selection.collapseToEnd(); } if (ev.data === '`' && !closestElement(selection.anchorNode, 'code')) { // We just inserted a backtick, check if there was another