From eb410c8076e697b405cb970720e8a6542114318d Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 16 Aug 2026 21:36:16 +0900 Subject: [PATCH] fix: KsDataGrid - add retry logic to Enter key edit mode like focusRow - Apply same ensureEditMode retry pattern to onCellKeyDown - Retry startEditingCell at 0ms, 10ms, 50ms after tabToNextCell - Ensures next cell enters edit mode reliably after Enter key --- frontend/src/shared/ui/components/KsDataGrid.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index 29556146..aa8def51 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -116,10 +116,18 @@ function onCellKeyDown(event: any): void { if (event.event.key === 'Enter' && event.colDef?.editable) { event.event.preventDefault() event.api.stopEditing(false) + event.api.tabToNextCell(false) - setTimeout(() => { - event.api.tabToNextCell(false) - }, 0) + const ensureEditMode = () => { + const focusedCell = event.api.getFocusedCell() + if (focusedCell) { + event.api.startEditingCell(focusedCell) + } + } + + ensureEditMode() + setTimeout(ensureEditMode, 10) + setTimeout(ensureEditMode, 50) } }