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);
|
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());
|
return toDisposable(() => observer?.disconnect());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user