From 4f2dd519c685e5204e5e3932556082872ea44d48 Mon Sep 17 00:00:00 2001 From: Bent Date: Mon, 3 Jul 2017 08:46:53 +0200 Subject: [PATCH] Fix terminal scrolling and terminalNotify The original statement seems to be a bit too precise regarding the height. Any tiny lag or one pixel movement leads to the console not being scrolled to the bottom anymore. Same applies for manually scrolling down which does not hide the `terminalNotify` properly. A bit larger "buffer" fixes this. --- public/themes/pterodactyl/js/frontend/console.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/pterodactyl/js/frontend/console.js b/public/themes/pterodactyl/js/frontend/console.js index 96639b156..88ceb1196 100644 --- a/public/themes/pterodactyl/js/frontend/console.js +++ b/public/themes/pterodactyl/js/frontend/console.js @@ -116,7 +116,7 @@ $(document).ready(function () { }); $terminal.on('scroll', function () { - if ($(this).scrollTop() + $(this).innerHeight() < $(this)[0].scrollHeight) { + if ($(this).scrollTop() + $(this).innerHeight() + 50 < $(this)[0].scrollHeight) { $scrollNotify.removeClass('hidden'); } else { $scrollNotify.addClass('hidden');