Skip to content

Fix fullscreen container dimension detection when not directly on body #205884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi

layout(): void {
if (!this.disposed) {
this._mainContainerDimension = getClientArea(this.parent);
this._mainContainerDimension = getClientArea(this.state.runtime.mainWindowFullscreen ?
mainWindow.document.body : // in fullscreen mode, make sure to use <body> element because
this.parent // in that case the workbench will span the entire site
);
this.logService.trace(`Layout#layout, height: ${this._mainContainerDimension.height}, width: ${this._mainContainerDimension.width}`);

position(this.mainContainer, 0, 0, 0, 0, 'relative');
Expand Down