Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(range-selector): focus after confirm (#4029)
Gpound.liu0e5bd855f301
diff --git a/packages/sheets-formula-ui/src/views/range-selector/index.tsx b/packages/sheets-formula-ui/src/views/range-selector/index.tsxindex 8d5e4feb98..904f2a7bb5 100644--- a/packages/sheets-formula-ui/src/views/range-selector/index.tsx+++ b/packages/sheets-formula-ui/src/views/range-selector/index.tsx@@ -318,14 +318,19 @@ export function RangeSelector(props: IRangeSelectorProps) {rangeDialogVisibleSet(false);onRangeSelectorDialogVisibleChange(false);setTimeout(() => {+ isFocusSet(true);editor?.setSelectionRanges([{ startOffset: text.length, endOffset: text.length }]);+ focus();}, 30);};const handleClose = () => {rangeDialogVisibleSet(false);onRangeSelectorDialogVisibleChange(false);- setTimeout(focus, 30);+ setTimeout(() => {+ isFocusSet(true);+ focus();+ }, 30);};const handleOpenModal = () => {@@ -335,6 +340,7 @@ export function RangeSelector(props: IRangeSelectorProps) {setTimeout(() => {rangeDialogVisibleSet(true);onRangeSelectorDialogVisibleChange(true);+ isFocusSet(false);}, 30);}};