From 5d145d72c88c1c832b398271fe2938f5da55186d Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 12 Apr 2017 05:40:21 -0400 Subject: PLT-6294 Fixed iOS not scrolling to bottom of post list (#6077) --- webapp/components/post_view/components/post_list.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'webapp/components/post_view') 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() { -- cgit v1.2.3-1-g7c22