diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-12 05:40:21 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-04-12 10:40:21 +0100 |
commit | 5d145d72c88c1c832b398271fe2938f5da55186d (patch) | |
tree | 8313a59e57682c29760ae6181480feb9242aea50 /webapp | |
parent | b3305d82eb92c2b9d7cf57f6c61ea79b18248228 (diff) | |
download | chat-5d145d72c88c1c832b398271fe2938f5da55186d.tar.gz chat-5d145d72c88c1c832b398271fe2938f5da55186d.tar.bz2 chat-5d145d72c88c1c832b398271fe2938f5da55186d.zip |
PLT-6294 Fixed iOS not scrolling to bottom of post list (#6077)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/post_view/components/post_list.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx index a5369454d..496f39334 100644 --- a/webapp/components/post_view/components/post_list.jsx +++ b/webapp/components/post_view/components/post_list.jsx @@ -489,8 +489,14 @@ export default class PostList extends React.Component { } scrollToBottomAnimated() { - var postList = $(this.refs.postlist); - postList.animate({scrollTop: this.refs.postlist.scrollHeight}, '500'); + if (UserAgent.isIos()) { + // JQuery animation doesn't work on iOS + this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; + } else { + var postList = $(this.refs.postlist); + + postList.animate({scrollTop: this.refs.postlist.scrollHeight}, '500'); + } } getArchivesIntroMessage() { |