Open Bug 2088874 Opened 1 day ago Updated 1 day ago

Fullscreen (F11) with "Expand sidebar on hover": moving the mouse onto the expanded vertical tabs hides the toolbar and sidebar

Categories

(Firefox :: Sidebar, defect)

Firefox 159
defect

Tracking

()

UNCONFIRMED

People

(Reporter: max.social, Unassigned)

Details

Steps to reproduce

  1. Use a new profile. Turn on vertical tabs.
  2. In "Customize sidebar", turn on "Expand sidebar on hover".
  3. Open about 20 tabs.
  4. Press F11.
  5. Move the mouse to the top edge. The toolbar and the sidebar appear.
  6. Move the mouse onto the sidebar so it expands. Then move down to a tab further down the list and try to click it.

Actual results

The toolbar and the sidebar hide as soon as the mouse is over the expanded part of the sidebar. The tab can't be clicked.

Expected results

The toolbar and the sidebar stay visible while the mouse is over the expanded sidebar, the same as for the collapsed sidebar since bug 2064638.

Why this happens (from reading the code):
In fullscreen, Firefox hides the toolbar when the mouse enters a rectangle built from gBrowser.tabpanels, minus the top 50px (_mouseTargetRectFromBounds in browser-fullScreenAndPointerLock.js). With "Expand sidebar on hover", the expanded #sidebar-container is position: absolute and lies over the page (sidebar.css, "Expand on hover"). So tabpanels keeps its full width, and the rectangle still covers the expanded sidebar. The mouse on a tab counts as "in the page".

Bug 2064638 fixed this for a sidebar that takes up space in the layout. The sidebar that expands over the page is not covered.

Tested on: Firefox 159.0.1, Windows 10 Pro 22H2, new profile, no customizations.

See also: bug 2064638, bug 2052706, bug 2072598

The Bugbug bot thinks this bug should belong to the 'Firefox::Sidebar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Sidebar

The analysis in comment 0 is right. FullScreen.getMouseTargetRect in browser-fullScreenAndPointerLock.js hides the chrome from a rect built only from gBrowser.tabpanels. A #sidebar-container[sidebar-launcher-expanded] goes position: absolute over the content (sidebar.css) while the content area keeps its collapsed-width margin, so the strip between the collapsed and expanded launcher width counts as content and onMouseEnter calls hideNavToolbox().

Fix: In FullScreen.getMouseTargetRect, when the root has sidebar-expand-on-hover and the visible container has sidebar-launcher-expanded, clip the cached rect against getBoundsWithoutFlushing(SidebarController.sidebarContainer). Pick the side from geometry, as _launcherEdgeListener already does at #906-923, so RTL works. Then add a task next to test_mouse_target_rect_excludes_sidebar in browser_f11_fullscreen_sidebar.js that expands the launcher on hover, asserts the toolbox stays up over the expanded strip, and asserts it still hides once the pointer moves into the page.

Suggested severity: S3. With vertical tabs and expand-on-hover in F11 fullscreen, tabs below the fold can't be clicked with the mouse, but leaving fullscreen or turning off expand-on-hover works around it.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

You need to log in before you can comment on or make changes to this bug.