Open Bug 1918789 Opened 1 month ago Updated 1 month ago

Firefox hides a scrollbar (unlike other browsers) when body has `display:table` and either `overflow-x:hidden` or `overflow-y:hidden`.

Categories

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

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

[Spinning this off from bug 1895994 to serve as a platform bug, so bug 1895994 can track the site-report / site-patch that landed over here.]

STR:

  1. Load attached testcase.

ACTUAL RESULTS:
No horizontal scrollbar on the window (you can't scroll to the right edge).

EXPECTED RESULTS:
Maybe there should be a horizontal scrollbar? All other browser engines (including pre-Chromium EdgeHTML) seem to show one, per bug 1895994 comment 15.

We've got the same bug (or difference-vs-other-browsers) with a missing vertical scrollbar if I use overflow-y:hidden in the testcase (rather than overflow-x).

However, if I specify hidden in both axes (overflow:hidden), then browsers agree that we should hide both scrollbars.

emilio, do you happen to know where Chromium's body-to-root-scroller scrollbar-propagation code lives? I wonder if they've got some sort of weird special-case for this scenario that we can find and consider implementing? (Might conceivably be there for legacy/webcompat purposes, or due to something subtle related to the table-wrapper-box; not sure)

Flags: needinfo?(emilio)

There are some suspicious LayoutBlock checks in here and here... Note that in Blink LayoutBlock is not only used for display: block but also for a bunch of other things... But notably not table.

I suspect it's just a bug in WebKit that Blink ended up inheriting. We should add this to Jeff's list of "bugs in other browsers that are worth fixing".

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

I suspect it's just a bug in WebKit that Blink ended up inheriting.

That was my initial assumption, too -- though FWIW, IE and EdgeHTML match WebKit/Blink here, too. So maybe it was originally an IE quirk that WebKit matched, whether intentionally or accidentally? :)

(Opera 12 Presto matches Gecko on this, however, so we're not entirely the only engine that did what-seems-to-be-intuitive here.)

We should add this to Jeff's list of "bugs in other browsers that are worth fixing".

Sounds good! CC'ing Jeff and some folks involved with interop stuff.

Rune mentioned that this is because they end up computing the table to overflow: visible due to this code, so the propagation doesn't happen. A bit of a WTF tbh.

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

Attachment

General

Created:
Updated:
Size: