From 96ca098f4bcb9d6cf1a0465a8aeade2db9294e1d Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Wed, 6 Jul 2016 08:50:43 -0400
Subject: PLT-3473 Made shortcuts only work for CMD on OSX (#3479)

* checked for CMD key

* changed method of checking
---
 webapp/components/file_upload.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/components/file_upload.jsx')

diff --git a/webapp/components/file_upload.jsx b/webapp/components/file_upload.jsx
index 89b184ea6..2f485d4d3 100644
--- a/webapp/components/file_upload.jsx
+++ b/webapp/components/file_upload.jsx
@@ -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');
-- 
cgit v1.2.3-1-g7c22

