PLT-3473 Made shortcuts only work for CMD on OSX (#3479)
* checked for CMD key * changed method of checking
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6c33350f5c
Коммит
96ca098f4b
@@ -280,7 +280,7 @@ class FileUpload extends React.Component {
|
||||
}
|
||||
|
||||
keyUpload(e) {
|
||||
if ((e.ctrlKey || e.metaKey) && e.keyCode === Constants.KeyCodes.U) {
|
||||
if (Utils.cmdOrCtrlPressed(e) && e.keyCode === Constants.KeyCodes.U) {
|
||||
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