diff options
author | Dessalines <dessalines@users.noreply.github.com> | 2020-07-11 21:47:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-11 21:47:38 -0400 |
commit | 74655de6180d53e8c5f7a4cf156b471de181bf21 (patch) | |
tree | 46f717080566954d453479ca63d1eb035587376c /ui/src/components/comment-form.tsx | |
parent | f3dbfcd37b84f58b42dfdbeec14334ba5af8e379 (diff) |
Comment box focus (#947)
* Add fallback url to fuse devserver(closes #945)
* Only focus on reply commentform textareas. Fixes #944
Co-authored-by: Justin Hernandez <jmarthernandez@gmail.com>
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r-- | ui/src/components/comment-form.tsx | 5 |
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(); + } } } |