Server Console initial terminal size calculations incorrect
https://github.com/pelican-dev/panel/blob/329a29f7daad089dd3901cc06fd68b2075cd76d0/resources/views/filament/components/server-console.blade.php#L84-L88
Current code sets the fit during loading which causes the fit addon to use incorrect sizes for resizing the terminal. This causes the console lines to overflow the terminal pane (and the terminal scrollbar...) breaking scrollbar dragging and causing text to not be visible.
Adding a load event handler here to resize once the page has loaded should fix the issue.
fitAddon.fit(); //Fit on first load
// adjust the terminal dimensions when the window resizes
window.addEventListener('resize', () => {
fitAddon.fit();
});
// set the initial terminal dimensions after all components load
window.addEventListener('load', () => {
fitAddon.fit();
});
Thanks, we'll look into this shortly!
Looks like this only fixes the issue on page load if the server console is the first page/main page being loaded (such as a refresh). if another page loads (such as the main sever selection page), it will still load with the wrong dimensions. another event/trigger may be the better to resolve this when the console page is fully loaded, instead.
I'd appreciate a fix for this, it's a tiny thing but after using the panel for the first time this is the only bug I've noticed so far.