Skip to content

Fix: Admin bar visibility when fullscreen window is minimized - #384

Merged
AllTerrainDeveloper merged 2 commits into
WordPress:trunkfrom
CookieDarb:fix/admin-bar-fullscreen-minimized
Jul 21, 2026
Merged

Fix: Admin bar visibility when fullscreen window is minimized#384
AllTerrainDeveloper merged 2 commits into
WordPress:trunkfrom
CookieDarb:fix/admin-bar-fullscreen-minimized

Conversation

@CookieDarb

Copy link
Copy Markdown
Contributor

What?

Closes #383

Fixes the bug where the WordPress admin bar remains hidden when a fullscreen window is minimized.

Why?

When a window enters fullscreen mode, it adds a global CSS class (desktop-mode-has-fullscreen-window) to the body to hide the admin bar for an immersive experience. Previously, minimizing this fullscreen window kept the class active because the window retained its underlying fullscreen state, leaving the admin bar inaccessible across the entire desktop.

How?

  • src/window/dom.ts:
    • Updated updateFullscreenBodyClass() to ignore minimized windows (:not(.desktop-mode-window--minimized)). This ensures the body class is removed if the only fullscreen windows are docked.
  • src/window/index.ts:
    • Updated the minimize() method to immediately call updateFullscreenBodyClass() if the window being minimized is in fullscreen mode, instantly updating the admin bar's visibility.

Testing Instructions

  1. Open any window in the desktop mode environment.
  2. Enter fullscreen mode for that window.
  3. Observe that the WordPress admin bar disappears.
  4. Minimize the fullscreen window.
  5. Verify that the WordPress admin bar immediately reappears.

Screencast

Screen.Recording.2026-07-21.at.8.46.09.PM.mov

CookieDarb and others added 2 commits July 21, 2026 20:39
Two regression tests for updateFullscreenBodyClass():
- minimizing a fullscreen window clears
  body.desktop-mode-has-fullscreen-window (the admin-bar bug)
- the class survives while another visible fullscreen window
  remains, and drops when the last one minimizes

Verified both fail against trunk's window sources.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@AllTerrainDeveloper AllTerrainDeveloper left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this contribution! It works perfectly. 🙌

The only thing missing was a couple of tests, so I took the liberty of adding two to cover the new behavior. Other than that, everything looks great. Thanks again for your work!

@AllTerrainDeveloper
AllTerrainDeveloper merged commit 32f07bc into WordPress:trunk Jul 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin bar fails to reappear after minimizing a fullscreen window

2 participants