summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-12 05:40:21 -0400
committerGeorge Goldberg <george@gberg.me>2017-04-12 10:40:21 +0100
commit5d145d72c88c1c832b398271fe2938f5da55186d (patch)
tree8313a59e57682c29760ae6181480feb9242aea50 /webapp
parentb3305d82eb92c2b9d7cf57f6c61ea79b18248228 (diff)
downloadchat-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.jsx10
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() {