Fixing IE scrolling issue and also fixing horizontal scrollbar

This commit is contained in:
Asaad Mahmood
2015-12-14 22:27:41 +05:00
parent ab367f2bc6
commit 95e0fd88fc
4 changed files with 7 additions and 6 deletions

View File

@@ -233,7 +233,8 @@ export default class PostsView extends React.Component {
window.requestAnimationFrame(() => {
// If separator exists scroll to it. Otherwise scroll to bottom.
if (this.refs.newMessageSeparator) {
this.refs.newMessageSeparator.scrollIntoView();
var objDiv = this.refs.postlist;
objDiv.scrollTop = this.refs.newMessageSeparator.offsetTop; //scrolls node to top of Div
} else {
this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight;
}