desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Video controls going under the screen when in fullscreen using Zen in fullscreen mode

Open alexdima03 opened this issue 1 year ago • 56 comments

Preliminary Checks

  • [x] I have read and understood the important section above.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

When i use Zen in fullscreen mode on my Macbook on its internal monitor, the video controls go under the screen like there is a portion of screen that it tries to fill, but it obviously doesn't exist, and makes the video controls unusable (tried on YouTube and X); this doesn't happen on an external monitor though.

Expected behavior

The video controls should be visible on fullscreen, ready to use

Actual behavior

The video controls go under the screen, making them unusable

Steps to reproduce

  1. Use Zen on fullscreen mode on the Macbook's internal monitor
  2. Open a video
  3. Put it on fullscreen)

Screenshots and videos

Image actual behavior

Image expected behavior

Version

1.16.2b

What platform are you seeing the problem on?

macOS - aarch64

What component is this issue related to?

Other

Relevant log output if applicable


alexdima03 avatar Sep 28 '25 09:09 alexdima03

Same issue

xibrox avatar Oct 09 '25 20:10 xibrox

Same here, also on Mac, I don't think it happens on my Windows installation.

I tried launching Zen with no extensions enabled and still had the issue. Tested on Youtube and Vimeo.

Perchycs avatar Oct 14 '25 09:10 Perchycs

Same issue, here's my experience:

M1 Pro, MacOS. After updating around 10/3/25, when I try to full screen any video on any platform, it'll maximize so much that I cannot see the bottom bar. Turned off all my zen mods and extensions, no change. Tried incognito mode too.

This only happens on compact mode and with Zen in exclusive full screen. It will not happen if one of those conditions isn't met.

AymenAbb avatar Oct 15 '25 18:10 AymenAbb

Tested on a fresh install of MacOS 26 on a M1 Air (no notch), no problems. I'll keep trying to triage the devices this happens on as I can.

AymenAbb avatar Oct 20 '25 13:10 AymenAbb

Oh looks like that is the issue. Looks like the notch isn't taken into consideration because I have M3 Air (with notch) on MacOS 26 and the problem is there.

xibrox avatar Oct 20 '25 15:10 xibrox

Dropped my M1 Pro resolution from 1512 x 982 (default) to 1512 x 945 (gets rid of notch), and the problem is gone. This is resolution related, probably to the notch yes.

AymenAbb avatar Oct 20 '25 16:10 AymenAbb

Okay to get this issue:

  1. U need macbook with a notch
  2. Compact mode

xibrox avatar Oct 20 '25 20:10 xibrox

  1. Mac with notch (default resolution)
  2. Compact mode
  3. Zen is in exclusive full screen

ALL must be true to get the bug. Since the bug doesn't exist on exclusive full screen with compact mode disabled, it's probably something with how Zen changes the resolution when compact mode is turned on.

AymenAbb avatar Oct 20 '25 21:10 AymenAbb

problem still present in 1.17b (even tho the new youtube ui makes it less worse than before)

alexdima03 avatar Oct 22 '25 10:10 alexdima03

This issue still present.

I can see it on YT, Twitch, Pexels, and X(twitter). Safe to assume it's there for every video site, as it's browser issue.


System:

  • MacBookPro (14 inch)
  • Apple M4 Pro
  • macOS - 26.0.1
  • Zen - 1.16.4b

LalitSinghRana avatar Oct 23 '25 19:10 LalitSinghRana

Is anyone currently looking into this? If not, I can pick it up, as long as there’s reviewer bandwidth.

LalitSinghRana avatar Oct 23 '25 19:10 LalitSinghRana

I made a small test page to check this bug, and it seems to occur on any full screen element (not necessarily video).

https://timonkuiters.nl/zen-fullscreen-bug.html

In compact mode on a MacBookPro (16 inch) with notch (Zen 1.17.1b), entering full screen hides the bottom right marker. Playing around with the height of the markers, it seems about 33px is hidden on the bottom, which seems to match the height of the notch.

Weirdly, the bug is not present in the same test on Codepen, but I would guess the difference is that the test there is inside an iframe. https://codepen.io/TimonK/pen/YPwLpdR

Also when the Web Developer Tools are open on the page (not in a separate window) the bug does not occur.

timonkuiters avatar Oct 23 '25 23:10 timonkuiters

I made a small test page to check this bug, and it seems to occur on any full screen element (not necessarily video).

https://timonkuiters.nl/zen-fullscreen-bug.html

In compact mode on a MacBookPro (16 inch) with notch (Zen 1.17.1b), entering full screen hides the bottom right marker. Playing around with the height of the markers, it seems about 33px is hidden on the bottom, which seems to match the height of the notch.

Weirdly, the bug is not present in the same test on Codepen, but I would guess the difference is that the test there is inside an iframe. https://codepen.io/TimonK/pen/YPwLpdR

Also when the Web Developer Tools are open on the page (not in a separate window) the bug does not occur.

I replicated everything you mentioned on my 14" m1 pro

AymenAbb avatar Oct 24 '25 12:10 AymenAbb

M3 air, I've found that when the initial browser window is not in fullscreen and moving into fullscreen via the video control the screen is mapped correctly, so that may be a temporary fix for some people

Samamyo avatar Oct 26 '25 22:10 Samamyo

2. Compact mode

Thanks, @AymenAbb. So easy workaround may be showing top panel - choose "Sidebar and Top Toolbar" option instead of "Only sidebar".

Image

You may leave compact mode on but do not hide toolbar:

Image

dmitriytarashkevich avatar Nov 22 '25 11:11 dmitriytarashkevich

Is there any way to fix this without waiting for the official release? For example, I managed to shift it upward, but then the title doesn’t fit:

:root[inDOMFullscreen="true"] #tabbrowser-tabpanels { margin-top: -38px !important; }

shumailow avatar Dec 01 '25 19:12 shumailow

Here's a possible small fix for this. I couldn't build the project, so I wasn't able to test whether it works. Could someone please try it?

Cause: updateElementSeparation() sets --zen-element-separation to 0 whenever [inFullscreen] is present. DOM fullscreen also sets this, so compact borderless offsets stay active during video fullscreen.

Idea: only zero padding for window fullscreen, not DOM fullscreen.

Patch:

diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js
@@
   updateElementSeparation() {
     const kMinElementSeparation = 0.1; // in px
     let separation = this.elementSeparation;
+    const inWindowFullscreen = document.documentElement.hasAttribute('inFullscreen');
+    const inDOMFullscreen =
+      document.documentElement.getAttribute('inDOMFullscreen') === 'true';
     if (
-      document.documentElement.hasAttribute('inFullscreen') &&
+      inWindowFullscreen &&
+      !inDOMFullscreen &&
       window.gZenCompactModeManager?.preference &&
       !document.getElementById('tabbrowser-tabbox')?.hasAttribute('zen-split-view') &&
       Services.prefs.getBoolPref('zen.view.borderless-fullscreen', true)
     ) {
       separation = 0;

NOX2912 avatar Dec 03 '25 22:12 NOX2912

@mr-cheffy It appears that the way the 8px window padding is currently removed when having compact mode enabled and going full screen messes up the offsets and causes content to run off screen for users of a macbook with a notch.

This (also) causes videos to render their controls half out of view when they are viewed full screen.

To repro:

  • Have Mac with notch
  • Compact mode enabled
  • (exclusive) Full screen the browser window (windowed browser and then using the fullscreen button on the video itself does not trigger the issue)

Good test to show the issue https://github.com/zen-browser/desktop/issues/10594#issuecomment-3439690006 Fix suggestion: https://github.com/zen-browser/desktop/issues/10594#issuecomment-3609168236

Thanks to all the contributors above for doing all the work. You're awesome.

p.s. pinging you because I think this issue has now formed a complete picture of the issue, it's cause and a possible solution. Can't repro myself since I don't own a macbook.

Propheticus avatar Dec 04 '25 15:12 Propheticus

Here's a possible small fix for this. I couldn't build the project, so I wasn't able to test whether it works. Could someone please try it?

Cause: updateElementSeparation() sets --zen-element-separation to 0 whenever [inFullscreen] is present. DOM fullscreen also sets this, so compact borderless offsets stay active during video fullscreen.

Idea: only zero padding for window fullscreen, not DOM fullscreen.

Patch:

diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js
@@
   updateElementSeparation() {
     const kMinElementSeparation = 0.1; // in px
     let separation = this.elementSeparation;
+    const inWindowFullscreen = document.documentElement.hasAttribute('inFullscreen');
+    const inDOMFullscreen =
+      document.documentElement.getAttribute('inDOMFullscreen') === 'true';
     if (
-      document.documentElement.hasAttribute('inFullscreen') &&
+      inWindowFullscreen &&
+      !inDOMFullscreen &&
       window.gZenCompactModeManager?.preference &&
       !document.getElementById('tabbrowser-tabbox')?.hasAttribute('zen-split-view') &&
       Services.prefs.getBoolPref('zen.view.borderless-fullscreen', true)
     ) {
       separation = 0;

Built this, no luck as it still behaves the same. Someone else should try it though too.

AymenAbb avatar Dec 04 '25 22:12 AymenAbb

Here's a possible small fix for this. I couldn't build the project, so I wasn't able to test whether it works. Could someone please try it?

Cause: updateElementSeparation() sets --zen-element-separation to 0 whenever [inFullscreen] is present. DOM fullscreen also sets this, so compact borderless offsets stay active during video fullscreen.

Idea: only zero padding for window fullscreen, not DOM fullscreen.

Patch:

diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js
@@
   updateElementSeparation() {
     const kMinElementSeparation = 0.1; // in px
     let separation = this.elementSeparation;
+    const inWindowFullscreen = document.documentElement.hasAttribute('inFullscreen');
+    const inDOMFullscreen =
+      document.documentElement.getAttribute('inDOMFullscreen') === 'true';
     if (
-      document.documentElement.hasAttribute('inFullscreen') &&
+      inWindowFullscreen &&
+      !inDOMFullscreen &&
       window.gZenCompactModeManager?.preference &&
       !document.getElementById('tabbrowser-tabbox')?.hasAttribute('zen-split-view') &&
       Services.prefs.getBoolPref('zen.view.borderless-fullscreen', true)
     ) {
       separation = 0;

Shuoldn't make a difference since all toolbars are hidden anyways on DOM fullscreen

mr-cheffy avatar Dec 05 '25 06:12 mr-cheffy