[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) <dmo@odoo.com>
This commit is contained in:
vishal padhiyar
2022-11-24 17:23:40 +01:00
committed by Hiral Bhavsar
parent b39f37153c
commit 12f2cd2d34
@@ -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