@@ -4,7 +4,7 @@ import type {MeasureInWindowOnSuccessCallback, NativeSyntheticEvent, TextInputFo
4
4
import { View } from 'react-native' ;
5
5
import type { OnyxEntry } from 'react-native-onyx' ;
6
6
import { withOnyx } from 'react-native-onyx' ;
7
- import { runOnJS , useAnimatedRef } from 'react-native-reanimated' ;
7
+ import { runOnJS , setNativeProps , useAnimatedRef } from 'react-native-reanimated' ;
8
8
import type { Emoji } from '@assets/emojis/types' ;
9
9
import type { FileObject } from '@components/AttachmentModal' ;
10
10
import AttachmentModal from '@components/AttachmentModal' ;
@@ -23,7 +23,6 @@ import useNetwork from '@hooks/useNetwork';
23
23
import useThemeStyles from '@hooks/useThemeStyles' ;
24
24
import useWindowDimensions from '@hooks/useWindowDimensions' ;
25
25
import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus' ;
26
- import { forceClearInput } from '@libs/ComponentUtils' ;
27
26
import * as DeviceCapabilities from '@libs/DeviceCapabilities' ;
28
27
import { getDraftComment } from '@libs/DraftCommentUtils' ;
29
28
import getModalState from '@libs/getModalState' ;
@@ -367,7 +366,7 @@ function ReportActionCompose({
367
366
// We are setting the isCommentEmpty flag to true so the status of it will be in sync of the native text input state
368
367
runOnJS ( setIsCommentEmpty ) ( true ) ;
369
368
runOnJS ( resetFullComposerSize ) ( ) ;
370
- forceClearInput ( animatedRef ) ;
369
+ setNativeProps ( animatedRef , { text : '' } ) ; // clears native text input on the UI thread
371
370
runOnJS ( submitForm ) ( ) ;
372
371
} , [ isSendDisabled , resetFullComposerSize , submitForm , animatedRef , isReportReadyForDisplay ] ) ;
373
372
0 commit comments