diff options
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/file_upload.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webapp/components/file_upload.jsx b/webapp/components/file_upload.jsx index 05f1701a8..829e580b9 100644 --- a/webapp/components/file_upload.jsx +++ b/webapp/components/file_upload.jsx @@ -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'); + } } } |