Skip to content

Commit

Permalink
Fix auto-scrolling (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthenw committed Aug 26, 2019
1 parent 1cacc26 commit 2150761
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions web/assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,6 @@ window.App = (function app(window, document) {
window.history.replaceState(null, document.title, _url.toString());
};

/**
* @return {Boolean}
* @private
*/
var _isScrolledBottom = function() {
var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
var totalHeight = document.body.offsetHeight;
var clientHeight = document.documentElement.clientHeight; // eslint-disable-line
return totalHeight <= currentScroll + clientHeight;
};

/**
* @return void
* @private
Expand Down Expand Up @@ -278,7 +267,7 @@ window.App = (function app(window, document) {
* @param {string} data data to log
*/
log: function log(data) {
var wasScrolledBottom = _isScrolledBottom();
var wasScrolledBottom = window.innerHeight + window.scrollY >= document.body.offsetHeight;
var div = document.createElement('div');
var p = document.createElement('p');
p.className = 'inner-line';
Expand Down

0 comments on commit 2150761

Please sign in to comment.