From db1e481bd37a7a3a7d0c485b765877222eeed5c5 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 16 Dec 2022 00:54:44 +0800 Subject: [PATCH] Ugh have to manual trigger onInput Is there a way to just auto trigger this? --- src/components/compose.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 469ce277..c35d8913 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -97,6 +97,7 @@ function Compose({ .filter((m) => m !== currentAccountInfo.acct) // Excluding self .map((m) => `@${m}`) .join(' ')} `; + textareaRef.current.dispatchEvent(new Event('input')); textareaRef.current.focus(); } setVisibility(visibility);