summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_comment.jsx
diff options
context:
space:
mode:
authorDavid Lu <david.lu@hotmail.com>2016-05-16 08:07:37 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-16 08:07:37 -0400
commitc5f105787c7d740eaa9fb01891711a6fb72f7480 (patch)
treeb2a04a73bce954e12553884339ba6d8b66ba276f /webapp/components/create_comment.jsx
parent0258fcfa5c8da92351371169b66ce30462a34853 (diff)
downloadchat-c5f105787c7d740eaa9fb01891711a6fb72f7480.tar.gz
chat-c5f105787c7d740eaa9fb01891711a6fb72f7480.tar.bz2
chat-c5f105787c7d740eaa9fb01891711a6fb72f7480.zip
Added CMD+UP for OSX (#2987)
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r--webapp/components/create_comment.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index c25be8716..8a078eb73 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -205,7 +205,7 @@ class CreateComment extends React.Component {
return;
}
- if (!e.ctrlKey && e.keyCode === KeyCodes.UP && this.state.messageText === '') {
+ if (!e.ctrlKey && !e.metaKey && e.keyCode === KeyCodes.UP && this.state.messageText === '') {
e.preventDefault();
const lastPost = PostStore.getCurrentUsersLatestPost(this.props.channelId, this.props.rootId);
@@ -224,7 +224,7 @@ class CreateComment extends React.Component {
});
}
- if (e.ctrlKey && e.keyCode === KeyCodes.UP) {
+ if ((e.ctrlKey || e.metaKey) && e.keyCode === KeyCodes.UP) {
const lastPost = PostStore.getCurrentUsersLatestPost(this.props.channelId, this.props.rootId);
if (!lastPost) {
return;