From 67514c6a6f5a1a4505cdd7bd8c8d7a5025e6f941 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 28 Oct 2025 12:10:55 +0800 Subject: [PATCH] fix: input loses focus when switching to another tab --- src/MarkdownTextInput.web.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MarkdownTextInput.web.tsx b/src/MarkdownTextInput.web.tsx index 97e08ebf..65952d72 100644 --- a/src/MarkdownTextInput.web.tsx +++ b/src/MarkdownTextInput.web.tsx @@ -605,7 +605,9 @@ const MarkdownTextInput = React.forwardRef = useCallback( (event) => { const e = event as unknown as NativeSyntheticEvent; - RNTextInput.State.blurTextInput?.(e.target); + if (event.target !== document.activeElement) { + RNTextInput.State.blurTextInput?.(e.target); + } removeSelection(); currentlyFocusedField.current = null; if (onBlur) {