Bug 1760737 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Guilherme Lopes from comment #10)
> (In reply to Daniel Holbert [:dholbert] from comment #9)
> 
> I think it's easier if I show the real application scenario. Here is a link to the application demo: https://plnkr.co/edit/70Rq8r4NvnFqgtY4
> If you click on the "burger" icon in the menu header to show the filter, it has a vertical scrollbar. On Firefox, it also shows a horizontal scrollbar.

Gotcha - yes, I do see that in Firefox 98 on Windows.  And if I add `.ag-menu { scrollbar-gutter:stable }`, that makes the horizontal scrollbar go away (fixing that issue).

At that point, if use devtools to delete content from the scrollable element so that the vertical scrollbar goes away as well, then we do still continue to reserve space for the vertical scrollbar (because of the `scrollbar-gutter:stable`) -- so that does appear as some extra padding on the right side of the component, and the centered contents look slightly off-center as a result.

I suspect that's the uneven thing you were talking about in bug 764076 comment 28 -- is that right?

I think that's a legitimate unfortunate-outcome of this current `scrollbar-gutter` suggested-workaround; hopefully it's not a concern in many cases (e.g. if the content isn't intended to be centered).  But if you do want the content to look centered -- particularly if it needs to look centered in the area-excluding-the-visible-scrollbar regardless of whether a scrollbar is present (such that either the content has to move or the component has to resize when the scrollbar appears) -- then I'm not sure that's something that can be fixed/worked-around easily right now.
(In reply to Guilherme Lopes from comment #10)
> (In reply to Daniel Holbert [:dholbert] from comment #9)
> 
> I think it's easier if I show the real application scenario. Here is a link to the application demo: https://plnkr.co/edit/70Rq8r4NvnFqgtY4
> If you click on the "burger" icon in the menu header to show the filter, it has a vertical scrollbar. On Firefox, it also shows a horizontal scrollbar.

Gotcha - yes, I do see that in Firefox 98 on Windows.  And if I add `.ag-menu { scrollbar-gutter:stable }`, that makes the horizontal scrollbar go away (fixing that issue).

At that point, if use devtools to delete content from the scrollable element so that the vertical scrollbar goes away as well, then we do still continue to reserve space for the vertical scrollbar (because of the `scrollbar-gutter:stable`) -- so that does appear as some extra padding on the right side of the component, and the centered contents look slightly off-center as a result.

I suspect that's the uneven thing you were talking about in bug 764076 comment 28 -- is that right?

I think that's a legitimate unfortunate-outcome of this current `scrollbar-gutter` suggested-workaround; hopefully it's not a concern in many cases (e.g. if for use cases where the content isn't expected to be precisely centered in the `overflow:auto` component).  But if you do want the content to look centered -- particularly if it needs to look centered in the area-excluding-the-visible-scrollbar regardless of whether a scrollbar is present (such that either the content has to move or the component has to resize when the scrollbar appears) -- then I'm not sure that's something that can be fixed/worked-around easily right now.

Back to Bug 1760737 Comment 11