diff --git a/packages/sheets-formula-ui/src/views/range-selector/index.tsx b/packages/sheets-formula-ui/src/views/range-selector/index.tsx index 8d5e4feb989..514dcb305bc 100644 --- a/packages/sheets-formula-ui/src/views/range-selector/index.tsx +++ b/packages/sheets-formula-ui/src/views/range-selector/index.tsx @@ -318,7 +318,9 @@ export function RangeSelector(props: IRangeSelectorProps) { rangeDialogVisibleSet(false); onRangeSelectorDialogVisibleChange(false); setTimeout(() => { + isFocusSet(true); editor?.setSelectionRanges([{ startOffset: text.length, endOffset: text.length }]); + focus(); }, 30); }; @@ -335,6 +337,7 @@ export function RangeSelector(props: IRangeSelectorProps) { setTimeout(() => { rangeDialogVisibleSet(true); onRangeSelectorDialogVisibleChange(true); + isFocusSet(false); }, 30); } };