From e50f416f2c8f7a99872bc02e5564c9eb0efe67b2 Mon Sep 17 00:00:00 2001 From: BeiyanYunyi <14120445+BeiyanYunyi@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:30:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20comment=20box=20does=20no?= =?UTF-8?q?t=20close=20when=20replying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/commentBoxState.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/commentBoxState.ts b/src/controllers/commentBoxState.ts index 5f9cf1d..26a4187 100644 --- a/src/controllers/commentBoxState.ts +++ b/src/controllers/commentBoxState.ts @@ -194,6 +194,9 @@ export const submitComment = () => { } else setData((dat) => [makeDataReactive(resComment), ...dat]); setContent(''); setPreviewText(''); + if (replyId()) { + clearReplyState(); + } return null; }) .catch((err: TypeError) => {