fix: Re-focus comment input after comment

This commit is contained in:
Tom Moor committed 2023-05-08 22:52:34 -04:00
1 parent 26a8c5e4ab
commit 8d157ff962
1 file changed
+5 -1
@@ -121,7 +121,6 @@ function CommentForm({
setData(undefined);
setForceRender((s) => ++s);
setInputFocused(false);
const comment = new Comment(
{
@@ -145,6 +144,11 @@ function CommentForm({
comment.isNew = false;
comment.createdById = user.id;
comment.createdBy = user;
// re-focus the comment editor
setTimeout(() => {
editorRef.current?.focusAtStart();
}, 0);
});
const handleChange = (