Fix logviewer autoscroll for chrome

Chrome does not support the scrollTopMax property
This commit is contained in:
Johannes Zellner
2018-04-13 13:12:30 +02:00
parent 290b44fbb7
commit a36439314d

View File

@@ -61,7 +61,7 @@ app.controller('LogsController', ['$scope', '$timeout', '$location', 'Client', f
// check if we want to auto scroll (this is before the appending, as that skews the check)
var tmp = $('.logs-container');
var autoScroll = tmp[0].scrollTop > (tmp[0].scrollTopMax - 24);
var autoScroll = tmp[0].scrollTop > (tmp[0].scrollHeight - tmp.innerHeight() - 24);
var logLine = $('<div class="log-line">');
var timeString = moment.utc(data.realtimeTimestamp/1000).format('MMM DD HH:mm:ss');