restored scroll functionality to default

This commit is contained in:
dzannotti 2015-08-07 20:30:51 +01:00
parent a19d7d6e9d
commit 2b2724c34f

View File

@ -61,8 +61,7 @@ export default class LogMonitor {
} else if ( } else if (
this.props.stagedActions.length < nextProps.stagedActions.length this.props.stagedActions.length < nextProps.stagedActions.length
) { ) {
const scrollableNode = node.parentElement; const { scrollTop, offsetHeight, scrollHeight } = node;
const { scrollTop, offsetHeight, scrollHeight } = scrollableNode;
this.scrollDown = Math.abs( this.scrollDown = Math.abs(
scrollHeight - (scrollTop + offsetHeight) scrollHeight - (scrollTop + offsetHeight)
@ -79,9 +78,8 @@ export default class LogMonitor {
} }
if (this.scrollDown) { if (this.scrollDown) {
const scrollableNode = node.parentElement; const { offsetHeight, scrollHeight } = node;
const { offsetHeight, scrollHeight } = scrollableNode; node.scrollTop = scrollHeight - offsetHeight;
scrollableNode.scrollTop = scrollHeight - offsetHeight;
this.scrollDown = false; this.scrollDown = false;
} }
} }