diff --git a/app/javascript/flavours/glitch/features/ui/components/report_modal.js b/app/javascript/flavours/glitch/features/ui/components/report_modal.js index ff81522a8ca..81643b6c236 100644 --- a/app/javascript/flavours/glitch/features/ui/components/report_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/report_modal.js @@ -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} />