1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-26 02:52:30 +01:00

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.
This commit is contained in:
Bent 2017-07-03 08:46:53 +02:00 committed by GitHub
parent db2a8047ee
commit 4f2dd519c6

View File

@ -116,7 +116,7 @@ $(document).ready(function () {
}); });
$terminal.on('scroll', 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'); $scrollNotify.removeClass('hidden');
} else { } else {
$scrollNotify.addClass('hidden'); $scrollNotify.addClass('hidden');