fix: Re-focus comment input after comment

This commit is contained in:
Tom Moor
2023-05-08 22:52:34 -04:00
parent 26a8c5e4ab
commit 8d157ff962

View File

@@ -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 = (