@@ -85,7 +85,7 @@ function ReportActionItemMessageEdit(
85
85
{ action, draftMessage, reportID, policyID, index, isGroupPolicyReport, shouldDisableEmojiPicker = false } : ReportActionItemMessageEditProps ,
86
86
forwardedRef : ForwardedRef < TextInput | HTMLTextAreaElement | undefined > ,
87
87
) {
88
- const [ preferredSkinTone ] = useOnyx ( ONYXKEYS . PREFERRED_EMOJI_SKIN_TONE , { initialValue : CONST . EMOJI_DEFAULT_SKIN_TONE } ) ;
88
+ const [ preferredSkinTone ] = useOnyx ( ONYXKEYS . PREFERRED_EMOJI_SKIN_TONE , { initialValue : CONST . EMOJI_DEFAULT_SKIN_TONE , canBeMissing : true } ) ;
89
89
const theme = useTheme ( ) ;
90
90
const styles = useThemeStyles ( ) ;
91
91
const StyleUtils = useStyleUtils ( ) ;
@@ -116,8 +116,8 @@ function ReportActionItemMessageEdit(
116
116
willAlertModalBecomeVisible : false ,
117
117
isVisible : false ,
118
118
} ,
119
- ] = useOnyx ( ONYXKEYS . MODAL ) ;
120
- const [ onyxInputFocused = false ] = useOnyx ( ONYXKEYS . INPUT_FOCUSED ) ;
119
+ ] = useOnyx ( ONYXKEYS . MODAL , { canBeMissing : true } ) ;
120
+ const [ onyxInputFocused = false ] = useOnyx ( ONYXKEYS . INPUT_FOCUSED , { canBeMissing : true } ) ;
121
121
122
122
const textInputRef = useRef < ( HTMLTextAreaElement & TextInput ) | null > ( null ) ;
123
123
const isFocusedRef = useRef < boolean > ( false ) ;
@@ -176,6 +176,7 @@ function ReportActionItemMessageEdit(
176
176
const setUpComposeFocusManager = useCallback ( ( ) => {
177
177
ReportActionComposeFocusManager . onComposerFocus ( ( ) => {
178
178
focus ( true , emojiPickerSelectionRef . current ? { ...emojiPickerSelectionRef . current } : undefined ) ;
179
+ emojiPickerSelectionRef . current = undefined ;
179
180
} , true ) ;
180
181
} , [ focus ] ) ;
181
182
0 commit comments