diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/report_modal.js | 7 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/styles/components/status.scss | 1 |
2 files changed, 8 insertions, 0 deletions
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 ff81522a8..81643b6c2 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} /> diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index 2b31e2dcb..f3c1fc375 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -229,6 +229,7 @@ top: 0; bottom: 0; background-image: linear-gradient(to bottom, rgba($base-shadow-color, .75), rgba($base-shadow-color, .65) 24px, rgba($base-shadow-color, .8)); + pointer-events: none; content: ""; } |