PLT-3473 Made shortcuts only work for CMD on OSX (#3479)

* checked for CMD key

* changed method of checking
Этот коммит содержится в:
David Lu
2016-07-06 08:50:43 -04:00
коммит произвёл Christopher Speller
родитель 6c33350f5c
Коммит 96ca098f4b
5 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@@ -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');