Before submitting#
Area#
apps/desktop
Steps to reproduce#
- Open the built-in browser panel.
- Load any page with an HTML5 video, e.g.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/video.
- Click the fullscreen button in the native
<video controls> toolbar.
Calling element.requestFullscreen() from a click handler on any page behaves the same way.
Expected behavior#
The video enters fullscreen, as it does in Chrome. Filling the browser panel or the T3 window would be enough. It doesn't have to take over the whole screen.
Actual behavior#
Nothing happens. The video stays inline and document.fullscreenElement stays null. Custom players that use the Fullscreen API (media-chrome, video.js, YouTube embeds) can't go fullscreen either.
Impact#
Minor bug or occasional failure
Version or commit#
0.0.45 (stable). The code below is unchanged on main @ 7812230.
Environment#
macOS 26.2 (arm64), T3 Code (Alpha) 0.0.45, Electron 44.4.2, Chrome 152.0.7977.130
Logs or stack traces#
No response
Screenshots, recordings, or supporting files#
No response
Workaround#
Open the page in an external browser.
Likely cause, from reading the source (not confirmed under a debugger):
- The preview session's permission handlers only allow
clipboard-read, clipboard-sanitized-write, notifications and geolocation. Electron routes the guest's requestFullscreen() through this handler as the fullscreen permission, so it gets denied. See BrowserSession.ts#L31-L40 and #L206-L211.
- No
enter-html-full-screen / leave-html-full-screen handlers exist on the <webview> or the guest webContents. Even with the permission granted, the panel layout wouldn't react.
A possible fix: allow fullscreen and, on enter-html-full-screen, expand the preview to the panel or window bounds instead of the OS screen.
Note
Grok responding on behalf of Julius.
Triage#
Thanks for the precise repro and the source pointers, @SherzodAli! This matches current
main(7812230572f2), and no other issue covers Fullscreen API failures in the built-in browser (the other fullscreen threads are about the desktop window chrome).What I found#
ALLOWED_PREVIEW_PERMISSIONSonly containsclipboard-read,clipboard-sanitized-write,notifications, andgeolocation, and both the request and check handlers consult it (BrowserSession.ts#L206-L211).requestFullscreen()through thefullscreenpermission, so it's denied.BrowserSession.test.tslocks the allowlist. A click on the native<video controls>button is a user gesture, so the gesture requirement isn't the blocker;document.fullscreenElementstayingnullis what a denied request looks like.enter-html-full-screen/leave-html-full-screenon the<webview>inHostedBrowserWebview.tsx. Since Electron 13, a grantedrequestFullscreen()inside a<webview>fullscreens the hostBrowserWindow, and Electron has no built-in switch to keep it inside the element.Likely fix area#
ALLOWED_PREVIEW_PERMISSIONSinapps/desktop/src/preview/BrowserSession.tsplus its test. Possible directions:fullscreen, which lets a preview page put the whole T3 window into OS fullscreen.enter-html-full-screen/leave-html-full-screen, as you suggested.A maintainer will decide on the fix direction.