Skip to content

Commit 58cf109

Browse files
committed
Fix full screen detection for Chromium
1 parent fab45de commit 58cf109

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/ide/src/fill/electron.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,15 @@ class BrowserWindow extends EventEmitter {
394394
if (typeof (window as any)["fullScreen"] !== "undefined") {
395395
return (window as any)["fullScreen"];
396396
}
397-
398397
// tslint:enable no-any
399-
return false;
398+
399+
try {
400+
return window.matchMedia("(display-mode: fullscreen)").matches;
401+
} catch (error) {
402+
logger.error(error.message);
403+
404+
return false;
405+
}
400406
}
401407

402408
public isFocused(): boolean {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy