Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Fullscreen API is denied in the built-in browser, so video fullscreen buttons do nothing #16059

ClosedSherzodAli(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open the built-in browser panel.
  2. Load any page with an HTML5 video, e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/video.
  3. 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.

  1. 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

    • Preview sessions install a deny-by-default permission handler. ALLOWED_PREVIEW_PERMISSIONS only contains clipboard-read, clipboard-sanitized-write, notifications, and geolocation, and both the request and check handlers consult it (BrowserSession.ts#L206-L211).
    • Electron routes requestFullscreen() through the fullscreen permission, so it's denied. BrowserSession.test.ts locks the allowlist. A click on the native <video controls> button is a user gesture, so the gesture requirement isn't the blocker; document.fullscreenElement staying null is what a denied request looks like.
    • Nothing listens for enter-html-full-screen / leave-html-full-screen on the <webview> in HostedBrowserWebview.tsx. Since Electron 13, a granted requestFullscreen() inside a <webview> fullscreens the host BrowserWindow, and Electron has no built-in switch to keep it inside the element.
    • This only affects the desktop in-app browser; web and mobile clients don't host this webview.

    Likely fix area

    ALLOWED_PREVIEW_PERMISSIONS in apps/desktop/src/preview/BrowserSession.ts plus its test. Possible directions:

    • Allow fullscreen, which lets a preview page put the whole T3 window into OS fullscreen.
    • Allow it but constrain the result to the preview panel or window bounds by handling enter-html-full-screen / leave-html-full-screen, as you suggested.

    A maintainer will decide on the fix direction.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. juliusmarminge closed this

Sign in to join this conversation.