From 24590b3e896ef36268c4afc9d30674a490c4e5f8 Mon Sep 17 00:00:00 2001 From: David Lu Date: Fri, 27 May 2016 08:42:00 -0700 Subject: Added preventDefault (#3137) --- webapp/components/create_comment.jsx | 1 + webapp/components/create_post.jsx | 1 + 2 files changed, 2 insertions(+) (limited to 'webapp') diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index 814cffef9..616257f37 100644 --- a/webapp/components/create_comment.jsx +++ b/webapp/components/create_comment.jsx @@ -225,6 +225,7 @@ class CreateComment extends React.Component { } if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.keyCode === KeyCodes.UP) { + e.preventDefault(); 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 14717b41e..75c75f09d 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -374,6 +374,7 @@ class CreatePost extends React.Component { } if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.keyCode === KeyCodes.UP) { + e.preventDefault(); const channelId = ChannelStore.getCurrentId(); const lastPost = PostStore.getCurrentUsersLatestPost(channelId); if (!lastPost) { -- cgit v1.2.3-1-g7c22