mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-25 18:42:31 +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:
parent
db2a8047ee
commit
4f2dd519c6
@ -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');
|
||||||
|
Loading…
Reference in New Issue
Block a user