From 7f6af6179bc0255001db891ec6407aa307ed92ea Mon Sep 17 00:00:00 2001 From: Aitor Moreno Date: Tue, 21 Oct 2025 09:34:41 +0200 Subject: [PATCH] :bug: Fix paste when collpaseNode is a br --- .../text-editor/src/editor/controllers/SelectionController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/text-editor/src/editor/controllers/SelectionController.js b/frontend/text-editor/src/editor/controllers/SelectionController.js index 1c69c1eef2..934ef82f3f 100644 --- a/frontend/text-editor/src/editor/controllers/SelectionController.js +++ b/frontend/text-editor/src/editor/controllers/SelectionController.js @@ -1101,6 +1101,9 @@ export class SelectionController extends EventTarget { ); this.focusParagraph.after(fragment, newParagraph); } + if (isLineBreak(collapseNode)) { + return this.collapse(collapseNode, 0); + } return this.collapse(collapseNode, collapseNode.nodeValue.length); }