Fix RHS scrolling center pane.

Этот коммит содержится в:
JoramWilander
2015-09-30 07:54:24 -04:00
родитель 5e9dccc464
Коммит 95b4d63d3f

Просмотреть файл

@@ -33,7 +33,7 @@ export default class SidebarRight extends React.Component {
if (!this.plScrolledToBottom) { if (!this.plScrolledToBottom) {
$('.top-visible-post')[0].scrollIntoView(); $('.top-visible-post')[0].scrollIntoView();
} else { } else {
var postHolder = $('.post-list-holder-by-time'); var postHolder = $('.post-list-holder-by-time').not('.inactive');
postHolder.scrollTop(postHolder[0].scrollHeight); postHolder.scrollTop(postHolder[0].scrollHeight);
} }
} }
@@ -51,7 +51,7 @@ export default class SidebarRight extends React.Component {
} }
} }
render() { render() {
var postHolder = $('.post-list-holder-by-time'); var postHolder = $('.post-list-holder-by-time').not('.inactive');
const position = postHolder.scrollTop() + postHolder.height() + 14; const position = postHolder.scrollTop() + postHolder.height() + 14;
const bottom = postHolder[0].scrollHeight; const bottom = postHolder[0].scrollHeight;
this.plScrolledToBottom = position >= bottom; this.plScrolledToBottom = position >= bottom;