From afea9121cf56a0c1f782ff492f2a63605c5d7928 Mon Sep 17 00:00:00 2001 From: Hana B <158238445+HanaB14@users.noreply.github.com> Date: Fri, 3 Apr 2026 08:18:58 -0400 Subject: [PATCH] fix: save column header edits when pressing Enter (#14775) ## The Fix Fixes #14744. Updated the menu input Enter key behavior so that pressing Enter now saves the edited database column header name and closes the menu immediately. This reuses the existing `blur()` save flow, keeping the behavior consistent with clicking outside the input. The Tab key behavior remains unchanged and still saves through the existing blur flow. ## Video Demonstration ### After https://github.com/user-attachments/assets/820a7c41-cae5-477c-8b65-b0667e0ce82b ## Summary by CodeRabbit * **Bug Fixes** * Improved keyboard handling in context menu input to properly blur the input field when pressing Enter, ensuring cleaner interaction behavior. --- blocksuite/affine/components/src/context-menu/input.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/blocksuite/affine/components/src/context-menu/input.ts b/blocksuite/affine/components/src/context-menu/input.ts index b2ae72e15a..6c86c69f85 100644 --- a/blocksuite/affine/components/src/context-menu/input.ts +++ b/blocksuite/affine/components/src/context-menu/input.ts @@ -71,6 +71,7 @@ export class MenuInput extends MenuFocusable { } if (e.key === 'Enter') { this.complete(); + this.inputRef.blur(); this.menu.close(); return; }