PLT-2755 Shortcut to upload file (#2967)
* wrong ref * Changed back to CTRL+U * Fixed scope of fileUpload * Removed stray comma
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
b6260e827e
Коммит
a4a06aa102
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user