From 5213ea142bab947235cffd5c7cb56319d8e9e941 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 16 Aug 2026 21:44:45 +0900 Subject: [PATCH] fix: KsDataGrid - replicate focusRow complete logic in Enter key handler - Use exact focusRow pattern: ensureIndexVisible + setFocusedCell + startEditingCell - Apply retry logic to all three operations - Ensures next cell gets full focus + edit mode like focusRow --- frontend/src/shared/ui/components/KsDataGrid.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/shared/ui/components/KsDataGrid.vue b/frontend/src/shared/ui/components/KsDataGrid.vue index aa8def51..50546da7 100644 --- a/frontend/src/shared/ui/components/KsDataGrid.vue +++ b/frontend/src/shared/ui/components/KsDataGrid.vue @@ -118,16 +118,20 @@ function onCellKeyDown(event: any): void { event.api.stopEditing(false) event.api.tabToNextCell(false) - const ensureEditMode = () => { + const attempt = () => { const focusedCell = event.api.getFocusedCell() if (focusedCell) { - event.api.startEditingCell(focusedCell) + const col = focusedCell.column.getColId() + const rowIndex = focusedCell.rowIndex + event.api.ensureIndexVisible(rowIndex) + event.api.setFocusedCell(rowIndex, col) + event.api.startEditingCell({ rowIndex, colKey: col }) } } - ensureEditMode() - setTimeout(ensureEditMode, 10) - setTimeout(ensureEditMode, 50) + attempt() + setTimeout(attempt, 10) + setTimeout(attempt, 50) } }