[Glitch] Submit report using meta key
Port 64d7a63f1830e970a6196448cae443ca5d55d1f9 to glitch-soc
This commit is contained in:
		
							parent
							
								
									d0faac9027
								
							
						
					
					
						commit
						f0161702d8
					
				| @ -63,6 +63,12 @@ export default class ReportModal extends ImmutablePureComponent { | |||||||
|     this.props.dispatch(submitReport()); |     this.props.dispatch(submitReport()); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   handleKeyDown = e => { | ||||||
|  |     if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { | ||||||
|  |       this.handleSubmit(); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   componentDidMount () { |   componentDidMount () { | ||||||
|     this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true })); |     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)} |               placeholder={intl.formatMessage(messages.placeholder)} | ||||||
|               value={comment} |               value={comment} | ||||||
|               onChange={this.handleCommentChange} |               onChange={this.handleCommentChange} | ||||||
|  |               onKeyDown={this.handleKeyDown} | ||||||
|               disabled={isSubmitting} |               disabled={isSubmitting} | ||||||
|             /> |             /> | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user