diff --git a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx index e81714e076..52f0ab8080 100644 --- a/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx +++ b/webapp/packages/plugin-data-spreadsheet-new/src/DataGrid/DataGridTable.tsx @@ -135,13 +135,13 @@ export const DataGridTable = observer('[tabindex="0"]'); + const focusSink = gridDiv?.querySelector('[aria-selected="true"]'); focusSink?.focus(); } function isGridInFocus(): boolean { const gridDiv = gridContainerRef.current; - const focusSink = gridDiv?.querySelector('[tabindex="0"]'); + const focusSink = gridDiv?.querySelector('[aria-selected="true"]'); if (!gridDiv || !focusSink) { return false;