mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Added preventDefault (#3137)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user