diff options
author | nickago <ngonella@calpoly.edu> | 2015-08-12 10:35:50 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-08-12 10:35:50 -0700 |
commit | d53827cce396035695c15a282c602e3d3a184369 (patch) | |
tree | 9988ad8312182e66a5f6b1d6388674b7e2247149 /web/react | |
parent | ec370604ac458d183ee6feff968b1640e01aa2de (diff) | |
download | chat-d53827cce396035695c15a282c602e3d3a184369.tar.gz chat-d53827cce396035695c15a282c602e3d3a184369.tar.bz2 chat-d53827cce396035695c15a282c602e3d3a184369.zip |
Added non-default reliant behavior to initial scroll on mount
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/post_list.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index bb4f7c2b1..1850d6256 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -64,7 +64,11 @@ module.exports = React.createClass({ SocketStore.addChangeListener(this._onSocketChange); // Timeout exists for the DOM to fully render before making changes - setTimeout(this.scrollWindow, 1); + var self = this + setTimeout(function initialScroll() { + self.holdPosition = false; + self.scrollWindow(); + }, 1); // Handle browser resizing $(window).resize(this.onResize); |