mirror of
https://github.com/outline/outline.git
synced 2026-11-26 07:33:19 +03:00
fix: Re-focus comment input after comment
This commit is contained in:
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 = (
|
||||
|
||||
Reference in new issue
Block a user