diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx index 5bc369751a63..701bbce6bf39 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx @@ -503,12 +503,12 @@ function ComposerWithSuggestions( const onSelectionChange = useCallback( (e: CustomSelectionChangeEvent) => { + setSelection(e.nativeEvent.selection); + if (!textInputRef.current?.isFocused()) { return; } suggestionsRef.current?.onSelectionChange?.(e); - - setSelection(e.nativeEvent.selection); }, [suggestionsRef], );