From 0d2d4bb6a1f5e02a82a1db8bd16a7431589fcb0c Mon Sep 17 00:00:00 2001 From: congzhou09 Date: Thu, 19 Mar 2026 22:22:22 +0800 Subject: [PATCH] fix(editor): note-edgeless-block loses edit state during shift-click range selection (#14675) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Problem ●In edgeless mode, when using Shift + click to perform range selection inside an editing `note-edgeless-block` (click at the starting point, then hold Shift and click at the end point), the block will unexpectedly lose its editing and selection state. As a result, subsequent operations on the selection - such as deleting and moving - no longer work. ●The following video demonstrates this issue: https://github.com/user-attachments/assets/82c68683-e002-4a58-b011-fe59f7fc9f02 ### Solution ●The reason is that this "Shift + click" behavior is being handled by the default multi-selection logic, which toggles selection mode and exits the editing state. So I added an `else-if` branch to match this case. ### After ●The video below shows the behavior after this fix. https://github.com/user-attachments/assets/18d61108-2089-4def-b2dc-ae13fc5ac333 ## Summary by CodeRabbit * **Bug Fixes** * Improved selection behavior during note editing in multi-select mode to provide more intuitive interaction when using range selection during active editing. --- blocksuite/affine/blocks/note/src/note-edgeless-block.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blocksuite/affine/blocks/note/src/note-edgeless-block.ts b/blocksuite/affine/blocks/note/src/note-edgeless-block.ts index 639bd0a185..172fcee73e 100644 --- a/blocksuite/affine/blocks/note/src/note-edgeless-block.ts +++ b/blocksuite/affine/blocks/note/src/note-edgeless-block.ts @@ -516,6 +516,9 @@ export const EdgelessNoteInteraction = } }) .catch(console.error); + } else if (multiSelect && alreadySelected && editing) { + // range selection using Shift-click when editing + return; } else { context.default(context); }