@@ -4,6 +4,7 @@ import type {ForwardedRef} from 'react';
44import React , { useCallback , useEffect , useRef } from 'react' ;
55import { View } from 'react-native' ;
66import Animated , { useSharedValue } from 'react-native-reanimated' ;
7+ import useLandscapeOnBlurProxy from '@hooks/useLandscapeOnBlurProxy' ;
78import useShortMentionsList from '@hooks/useShortMentionsList' ;
89import useTheme from '@hooks/useTheme' ;
910import useThemeStyles from '@hooks/useThemeStyles' ;
@@ -36,6 +37,8 @@ function RNMarkdownTextInputWithRef({maxLength, parser, ref, forwardedFSClass =
3637 // Expose the ref to the parent component
3738 React . useImperativeHandle < AnimatedMarkdownTextInputRef | null , AnimatedMarkdownTextInputRef | null > ( ref , ( ) => inputRef . current ) ;
3839
40+ const handleBlur = useLandscapeOnBlurProxy ( inputRef , props . onBlur ) ;
41+
3942 // Check if the cursor is at the end of the text
4043 const isCursorAtEnd = props . selection && props . value && props . selection . start === props . value . length ;
4144
@@ -96,6 +99,7 @@ function RNMarkdownTextInputWithRef({maxLength, parser, ref, forwardedFSClass =
9699 * If maxLength is not set, we should set it to CONST.MAX_COMMENT_LENGTH + 1, to avoid parsing markdown for large text
97100 */
98101 maxLength = { maxLength ?? CONST . MAX_COMMENT_LENGTH + 1 }
102+ onBlur = { handleBlur }
99103 />
100104 </ View >
101105 ) ;
0 commit comments