mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #4105 from jeanp413/jp/fix-vs-160070
Fixes https://github.com/microsoft/vscode/issues/160070
This commit is contained in:
@@ -31,6 +31,11 @@ export function observeDevicePixelDimensions(element: HTMLElement, callback: (de
|
||||
callback(width, height);
|
||||
}
|
||||
});
|
||||
observer.observe(element, { box: ['device-pixel-content-box'] } as any);
|
||||
try {
|
||||
observer.observe(element, { box: ['device-pixel-content-box'] } as any);
|
||||
} catch {
|
||||
observer.disconnect();
|
||||
observer = undefined;
|
||||
}
|
||||
return toDisposable(() => observer?.disconnect());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user