diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-06-28 02:59:08 +0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-06-27 14:59:08 -0400 |
commit | 0b62078712190be9edaf8428762185f1c38d5226 (patch) | |
tree | 933d4b779723483501cb6ee09193f41f10fc8e63 /webapp/components | |
parent | e2daa425fac3c976e21ed048b13424a2dc437a20 (diff) | |
download | chat-0b62078712190be9edaf8428762185f1c38d5226.tar.gz chat-0b62078712190be9edaf8428762185f1c38d5226.tar.bz2 chat-0b62078712190be9edaf8428762185f1c38d5226.zip |
[PLT-6745] Fix action of SHIFT+UP by fixing latest replay-able post (#6738)
* fix latest replayable post
* use PostUtils.isSystemMessage instead of checkin that post.type is empty
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/create_post.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 124728c3d..d0f2a0afd 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -496,9 +496,9 @@ export default class CreatePost extends React.Component { return; } - const latestNonEphemeralPost = PostStore.getLatestNonEphemeralPost(this.state.channelId); - const latestNonEphemeralPostId = latestNonEphemeralPost == null ? '' : latestNonEphemeralPost.id; - const lastPostEl = document.getElementById(`commentIcon_${this.state.channelId}_${latestNonEphemeralPostId}`); + const latestReplyablePost = PostStore.getLatestReplyablePost(this.state.channelId); + const latestReplyablePostId = latestReplyablePost == null ? '' : latestReplyablePost.id; + const lastPostEl = document.getElementById(`commentIcon_${this.state.channelId}_${latestReplyablePostId}`); if (!e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey && e.keyCode === KeyCodes.UP && this.state.message === '') { e.preventDefault(); |