summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar_right.jsx
diff options
context:
space:
mode:
authorsamogot <samogot@gmail.com>2016-06-10 16:59:13 +0300
committerJoram Wilander <jwawilander@gmail.com>2016-06-10 09:59:13 -0400
commit400bc8b46d16b1634504b875f3db212abbf04dfc (patch)
treeaa6f773bb2b6b464305c92ce8b7d749eb86605d5 /webapp/components/sidebar_right.jsx
parent09536af5add55bfc51840e8ecd927f03a69ea035 (diff)
downloadchat-400bc8b46d16b1634504b875f3db212abbf04dfc.tar.gz
chat-400bc8b46d16b1634504b875f3db212abbf04dfc.tar.bz2
chat-400bc8b46d16b1634504b875f3db212abbf04dfc.zip
Scrolling fixes (#3200)
* scrolling fixes: - jumps on free scroll when somebody posts a new message (and old one disappears at top) - jumps on closing RHS (no compensation of resize) - scroll blinking on opening/closing RHS (delay before resize compensation) * fix scroll slipping up on multiple open/close RHS in case when (this.refs.postlist.offsetHeight % Constants.SCROLL_PAGE_FRACTION === 0)
Diffstat (limited to 'webapp/components/sidebar_right.jsx')
-rw-r--r--webapp/components/sidebar_right.jsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/webapp/components/sidebar_right.jsx b/webapp/components/sidebar_right.jsx
index 22ddfc205..9e2fc32dd 100644
--- a/webapp/components/sidebar_right.jsx
+++ b/webapp/components/sidebar_right.jsx
@@ -10,8 +10,6 @@ import PostStore from 'stores/post_store.jsx';
import UserStore from 'stores/user_store.jsx';
import * as Utils from 'utils/utils.jsx';
-const SIDEBAR_SCROLL_DELAY = 500;
-
import React from 'react';
export default class SidebarRight extends React.Component {
@@ -55,8 +53,8 @@ export default class SidebarRight extends React.Component {
const isOpen = this.state.searchVisible || this.state.postRightVisible;
const willOpen = nextState.searchVisible || nextState.postRightVisible;
- if (!isOpen && willOpen) {
- setTimeout(() => PostStore.jumpPostsViewSidebarOpen(), SIDEBAR_SCROLL_DELAY);
+ if (isOpen !== willOpen) {
+ PostStore.jumpPostsViewSidebarOpen();
}
}
doStrangeThings() {