Fixed terminal resize error in Chrome.

This commit is contained in:
Ylian Saint-Hilaire 2020-05-22 00:45:09 -07:00
parent 822198d501
commit e1c4778c09
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1319,7 +1319,7 @@
window.onresize = function () { window.onresize = function () {
hideContextMenu(); hideContextMenu();
masterUpdate(512); masterUpdate(512);
if (xtermfit != null) { xtermfit.fit(); } if ((xtermfit != null) && (xxcurrentView == 12)) { xtermfit.fit(); }
} }
setTimeout(function() { masterUpdate(512); }, 200); setTimeout(function() { masterUpdate(512); }, 200);
@ -6355,7 +6355,7 @@
adjustPanels(); adjustPanels();
//setTimeout(adjustPanels, 10); //setTimeout(adjustPanels, 10);
//setTimeout(function() { xtermfit.fit(); }, 10); //setTimeout(function() { xtermfit.fit(); }, 10);
if (xterm != null) { xtermfit.fit(); if (xxcurrentView == 12) { xterm.focus(); } } if (xterm != null) { if (xxcurrentView == 12) { xtermfit.fit(); xterm.focus(); } }
} }
function deskToggleFocus() { function deskToggleFocus() {
@ -12129,6 +12129,9 @@
// Update Recordings // Update Recordings
if (x == 52) { if (p52recordings == null) { refreshRecodings(); } updateRecordings(); } if (x == 52) { if (p52recordings == null) { refreshRecodings(); } updateRecordings(); }
// Update terminal size
if ((x == 12) && (xtermfit != null)) { xtermfit.fit(); xterm.focus(); }
// Update the web page title // Update the web page title
if ((currentNode) && (x >= 10) && (x < 20)) { if ((currentNode) && (x >= 10) && (x < 20)) {
document.title = currentNode.name + ((meshes[currentNode.meshid])?(' - ' + meshes[currentNode.meshid].name):'') + ' - ' + decodeURIComponent('{{{extitle}}}'); document.title = currentNode.name + ((meshes[currentNode.meshid])?(' - ' + meshes[currentNode.meshid].name):'') + ' - ' + decodeURIComponent('{{{extitle}}}');