@@ -4,7 +4,7 @@ import type {MeasureInWindowOnSuccessCallback, NativeSyntheticEvent, TextInputFo
44import { View } from 'react-native' ;
55import type { OnyxEntry } from 'react-native-onyx' ;
66import { withOnyx } from 'react-native-onyx' ;
7- import { runOnJS , useAnimatedRef } from 'react-native-reanimated' ;
7+ import { runOnJS , setNativeProps , useAnimatedRef } from 'react-native-reanimated' ;
88import type { Emoji } from '@assets/emojis/types' ;
99import type { FileObject } from '@components/AttachmentModal' ;
1010import AttachmentModal from '@components/AttachmentModal' ;
@@ -23,7 +23,6 @@ import useNetwork from '@hooks/useNetwork';
2323import useThemeStyles from '@hooks/useThemeStyles' ;
2424import useWindowDimensions from '@hooks/useWindowDimensions' ;
2525import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus' ;
26- import { forceClearInput } from '@libs/ComponentUtils' ;
2726import * as DeviceCapabilities from '@libs/DeviceCapabilities' ;
2827import { getDraftComment } from '@libs/DraftCommentUtils' ;
2928import getModalState from '@libs/getModalState' ;
@@ -367,7 +366,7 @@ function ReportActionCompose({
367366 // We are setting the isCommentEmpty flag to true so the status of it will be in sync of the native text input state
368367 runOnJS ( setIsCommentEmpty ) ( true ) ;
369368 runOnJS ( resetFullComposerSize ) ( ) ;
370- forceClearInput ( animatedRef ) ;
369+ setNativeProps ( animatedRef , { text : '' } ) ; // clears native text input on the UI thread
371370 runOnJS ( submitForm ) ( ) ;
372371 } , [ isSendDisabled , resetFullComposerSize , submitForm , animatedRef , isReportReadyForDisplay ] ) ;
373372
0 commit comments