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) } }