mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-2755 Shortcut to upload file (#2967)
* wrong ref * Changed back to CTRL+U * Fixed scope of fileUpload * Removed stray comma
This commit is contained in:
@@ -284,7 +284,10 @@ class FileUpload extends React.Component {
|
||||
|
||||
keyUpload(e) {
|
||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === Constants.KeyCodes.U) {
|
||||
$(this.refs.input).focus().trigger('click');
|
||||
e.preventDefault();
|
||||
if (this.props.postType === 'post' && document.activeElement.id === 'post_textbox' || this.props.postType === 'comment' && document.activeElement.id === 'reply_textbox') {
|
||||
$(this.refs.fileInput).focus().trigger('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user