From 3e58a6ca4683326ef333402a1fe1fa0db9eda8dd Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 13 Oct 2025 16:34:44 +0200 Subject: [PATCH] fix: Single frame blank flash when saving comments (#10362) --- app/scenes/Document/components/CommentThreadItem.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scenes/Document/components/CommentThreadItem.tsx b/app/scenes/Document/components/CommentThreadItem.tsx index 203e174cd0..0d1b3a0603 100644 --- a/app/scenes/Document/components/CommentThreadItem.tsx +++ b/app/scenes/Document/components/CommentThreadItem.tsx @@ -1,5 +1,5 @@ import { differenceInMilliseconds } from "date-fns"; -import { action } from "mobx"; +import { runInAction } from "mobx"; import { observer } from "mobx-react"; import { DoneIcon } from "outline-icons"; import { darken } from "polished"; @@ -179,18 +179,18 @@ function CommentThreadItem({ ); }, []); - const handleSubmit = action(async (event: React.FormEvent) => { + const handleSubmit = async (event: React.FormEvent) => { event.preventDefault(); try { handleSetReadOnly(); - comment.data = data; + runInAction(() => (comment.data = data)); await comment.save(); } catch (_err) { setEditing(); toast.error(t("Error updating comment")); } - }); + }; const handleCancel = () => { setData(comment.data);