From c5f105787c7d740eaa9fb01891711a6fb72f7480 Mon Sep 17 00:00:00 2001 From: David Lu Date: Mon, 16 May 2016 08:07:37 -0400 Subject: [PATCH] Added CMD+UP for OSX (#2987) --- webapp/components/create_comment.jsx | 4 ++-- webapp/components/create_post.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index c25be8716d..8a078eb732 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; diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 863f969df7..32f1b387a6 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -351,7 +351,7 @@ class CreatePost 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 channelId = ChannelStore.getCurrentId(); @@ -373,7 +373,7 @@ class CreatePost extends React.Component { }); } - if (e.ctrlKey && e.keyCode === KeyCodes.UP) { + if ((e.ctrlKey || e.metaKey) && e.keyCode === KeyCodes.UP) { const channelId = ChannelStore.getCurrentId(); const lastPost = PostStore.getCurrentUsersLatestPost(channelId); if (!lastPost) {