Closed Bug 1980289 Opened 10 months ago Closed 10 months ago

Consider changing overlay scrollbar default setting ('scrollbar-gutter: stable' does not reserve any space for the scrollbar)

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

Firefox 141
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dramaretskiy, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0

Steps to reproduce:

Use 'scrollbar-gutter: stable' on a container element with overflow enabled.

Actual results:

Firefox does not reserve any space for the scrollbar on Win 11.

Expected results:

As advertised by the MDN's own description of the property, it should force the agent to reserve some space for the scrollbar, just like Chrome, Edge and Safari do. I am aware of the bug report 1865074 raised (and closed) earlier and I was able to force FF to behave in the expected way with both 'widget.gtk.overlay-scrollbars.enabled' and 'widget.windows.overlay-scrollbars.enabled' flags set to 'false'. However, in many cases, this can undermine layouts intended by web designers - e.g. imagine the table shown in the testcase file is cloned and the copy is placed next to the master along the horizontal line within a closely spaced container. Determining the required gap between the two is strongly dependent on whether any space is reserved for the scrollbar or not and that is exactly what the 'scrollbar-gutter' property is useful for. My own suggested resolution is that the two flags mentioned above are set to 'false' by default, to align with the majority of the web and to make the browser's behaviour truly 'OS neutral' as it should be.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

This should belong to win32 instead of Gtk.

Component: Widget: Gtk → Widget: Win32
Component: Widget: Win32 → Layout: Scrolling and Overflow

The severity field is not set for this bug.
:hiro, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)

From the CSS overflow spec;

stable
    The scrollbar gutter is present for classic scrollbars when overflow is hidden, scroll, or auto, regardless of whether the box is actually overflowing. Overlay scrollbars do not consume space. 

So, the scrollbar-gutter property doesn't affect for overlay scrollbars at all by the definition. I am wondering whether you agree on the current scrollbar-gutter behavior or not since the current bug title "'scrollbar-gutter: stable' does not reserve any space for the scrollbar" is quite confusing.

Also note that Gecko has tried to respect each OS behaviors, I mean features on Gecko depend on OS, for example, the mouse wheel scroll direction MacOS is the opposite direction of Windows and Linux. So the default of overlay scrollbars will not be changed.

Anyways, I'd rather suggest you to open a new spec issue to add a new CSS property to force sites using classic scrollbars.

Severity: -- → S3
Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3

Also note that our overlay scrollbars implementation does respect Windows settings, so even if we changed our default, for users who set the Windows setting to use overlay scrollbars, the site will not work as expected.

I am going to close as WONTFIX.

Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Resolution: --- → WONTFIX
Summary: 'scrollbar-gutter: stable' does not reserve any space for the scrollbar → Consider changing overlay scrollbar default setting ('scrollbar-gutter: stable' does not reserve any space for the scrollbar)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: