From 2b2724c34f7ea765c62a2b07ee1292cfe9567681 Mon Sep 17 00:00:00 2001 From: dzannotti Date: Fri, 7 Aug 2015 20:30:51 +0100 Subject: [PATCH] restored scroll functionality to default --- src/react/LogMonitor.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/react/LogMonitor.js b/src/react/LogMonitor.js index f119d0e7..30370001 100644 --- a/src/react/LogMonitor.js +++ b/src/react/LogMonitor.js @@ -61,8 +61,7 @@ export default class LogMonitor { } else if ( this.props.stagedActions.length < nextProps.stagedActions.length ) { - const scrollableNode = node.parentElement; - const { scrollTop, offsetHeight, scrollHeight } = scrollableNode; + const { scrollTop, offsetHeight, scrollHeight } = node; this.scrollDown = Math.abs( scrollHeight - (scrollTop + offsetHeight) @@ -79,9 +78,8 @@ export default class LogMonitor { } if (this.scrollDown) { - const scrollableNode = node.parentElement; - const { offsetHeight, scrollHeight } = scrollableNode; - scrollableNode.scrollTop = scrollHeight - offsetHeight; + const { offsetHeight, scrollHeight } = node; + node.scrollTop = scrollHeight - offsetHeight; this.scrollDown = false; } }