Closed Bug 1835705 Opened 2 years ago Closed 1 year ago

Scrollbar-gutter shows on resize with with position:sticky on bottom

Categories

(Core :: Layout: Positioned, defect, P3)

Firefox 113
Desktop
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1748891
Tracking Status
firefox113 --- affected
firefox114 --- ?
firefox115 --- affected

People

(Reporter: moz, Unassigned)

References

(Depends on 1 open bug, )

Details

Attachments

(2 files)

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0

  • Visit peter-hindelang.de/PH.html
    EDIT: new URL peter-hindelang.de/Vita.html

    EDIT: new URL https://peter-hindelang.de/Vita/
    There is a background-image covering the viewport (background-size: cover)
  • Resize window (by clicking resize-button near window closing button [x]) or reduce window height by mouse
    Result (almost always for me):
    Background-image dosesn't cover the whole viewport, the space of right scrollbar is coverd by the dark background-color. Needs reload to get the expected result

I'v seen this sometimes without window resizing as well.
Tested on Windows 7 with Fx 113.0.2 and current Nightly 115.

Additional info: This page https://peter-hindelang.de/
has a similar issue but it is hard to reproduce. Sometimes the background-image disapears completely, e.g. after sitching tabs.
(Edit: That similar issue affects the reported URL as well)

Component: Layout: Scrolling and Overflow → Layout: Images, Video, and HTML Frames

Sorry, I have to correct me (there isn't background-size:cover at all, background is a bit more tricky).
The problem is triggerd by position:sticky. It fixes the <address> element on bottom.

Summary: Background-image dosen't cover full viewort after window resize (problem with background-size:cover) → Background-image dosen't cover full viewort after window resize (problem with position:sticky on bottom)

I don't seem to be able to reproduce on nightly, on Linux...

Component: Layout: Images, Video, and HTML Frames → Layout: Positioned

You need classic scrollbars to reproduce. Looks like something where the page structure will cause an intermediate reflow with a scrollbar and then the final reflow will show that a scrollbar is not required, but somehow the page rect with the scrollbar is getting used stale somewhere.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(emcdonough)
Summary: Background-image dosen't cover full viewort after window resize (problem with position:sticky on bottom) → Background-image dosen't cover full viewport after window resize (problem with position:sticky on bottom)

Found a hack to work around this bug and implemented it in https://peter-hindelang.de/Vita/

function bugfix(x) { 
   document.documentElement.style.overflow = x;
}
onresize = function() { 
   bugfix(""); 
   setTimeout(bugfix, 0, "auto");
}

May it be helpful.

Attached file Reduced test-case.

So, thanks to :tnikkel's comment and yours I can reproduce now. This has nothing to do with background-size or anything, it's just about whether we think scrollbars should appear or not.

The viewport-relative padding on the <body> helps reproduce, but I can repro when reducing the size without it.

Ting-Yu, you're the most familiar with scrollbar-gutter-related issues, maybe you can dig a bit to see if we can prevent this from happening?

Flags: needinfo?(emilio)
Flags: needinfo?(emcdonough)
Flags: needinfo?(aethanyc)

.

Severity: -- → S3
Priority: -- → P3
Summary: Background-image dosen't cover full viewport after window resize (problem with position:sticky on bottom) → Scrollbar-gutter shows on resize with with position:sticky on bottom

This happens just with block layout too.

Ting-Yu, you're the most familiar with scrollbar-gutter-related issues, maybe you can dig a bit to see if we can prevent this from happening?

This is actually is a sticky positioning and overflow area issue. My proposed patches in bug 1748891 fixed testcases in this bug. I'll make this a dup after my patches are accepted.

Flags: needinfo?(aethanyc)

Both reduced testcase in comment 6 and comment 8 are fixed by bug 1748891. Tested on Nightly 127.0a1 (2024-04-26).

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1748891
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: