Browse Source

Submit report using meta key (#7729)

pull/4/head
Yamagishi Kazutoshi 5 years ago
committed by Eugen Rochko
parent
commit
64d7a63f18
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      app/javascript/mastodon/features/ui/components/report_modal.js

+ 7
- 0
app/javascript/mastodon/features/ui/components/report_modal.js View File

@ -63,6 +63,12 @@ export default class ReportModal extends ImmutablePureComponent {
this.props.dispatch(submitReport());
}
handleKeyDown = e => {
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
this.handleSubmit();
}
}
componentDidMount () {
this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));
}
@ -98,6 +104,7 @@ export default class ReportModal extends ImmutablePureComponent {
placeholder={intl.formatMessage(messages.placeholder)}
value={comment}
onChange={this.handleCommentChange}
onKeyDown={this.handleKeyDown}
disabled={isSubmitting}
/>

Loading…
Cancel
Save