From 1f927a0d6aa7c8a80ae71477066d5751ecfd4f07 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus <50919443+bernhardoj@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:10:09 +0800 Subject: [PATCH] Auto focus only on mount (#362) --- src/MarkdownTextInput.web.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MarkdownTextInput.web.tsx b/src/MarkdownTextInput.web.tsx index 2745b9a7..7e56c180 100644 --- a/src/MarkdownTextInput.web.tsx +++ b/src/MarkdownTextInput.web.tsx @@ -586,7 +586,8 @@ const MarkdownTextInput = React.forwardRef( if (autoFocus) { divRef.current.focus(); } - }, [autoFocus]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); useEffect(() => { // update content size when the input styles change