potential fix for #729

This commit is contained in:
Eugene Pankov
2019-07-16 23:29:56 +02:00
parent 0804b949fc
commit ce49dd9dae
2 changed files with 6 additions and 4 deletions

View File

@@ -85,7 +85,9 @@ export class XTermFrontend extends Frontend {
this.resizeHandler = () => {
try {
this.fitAddon.fit()
if (getComputedStyle(this.xtermCore.element).getPropertyValue('height') !== 'auto') {
this.fitAddon.fit()
}
} catch (e) {
// tends to throw when element wasn't shown yet
console.warn('Could not resize xterm', e)