summaryrefslogtreecommitdiffstats
path: root/ui/src/components/comment-form.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r--ui/src/components/comment-form.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index 04720cbb..00b4fe1e 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -33,6 +33,7 @@ interface CommentFormProps {
onReplyCancel?(): any;
edit?: boolean;
disabled?: boolean;
+ focus?: boolean;
}
interface CommentFormState {
@@ -122,7 +123,9 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
setTimeout(() => autosize.update(textarea), 10);
}
- textarea.focus();
+ if (this.props.focus) {
+ textarea.focus();
+ }
}
}