Open Bug 1781297 Opened 3 years ago Updated 12 days ago

Content moves down in the scrollport, when a reflow occurs, with "float:left;position:sticky" element followed by some cleared tall content

Categories

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

defect

Tracking

()

Tracking Status
firefox146 --- affected

People

(Reporter: dholbert, Unassigned)

References

(Blocks 4 open bugs)

Details

(Keywords: parity-chrome, parity-edge, webcompat:platform-bug)

User Story

user-impact-score:2030

Attachments

(3 files, 1 obsolete file)

[I'm spinning this off from bug 1618029 comment 3. Thanks to @toulousevictor for the bug report over there.]

STR:

  1. Click the pin/thumbtack icon at the top left.
  2. Load attached testcase (original URL: https://jsfiddle.net/vctls/mac2Ls0d/16/ )
  3. Scroll down and hover the green folder icon at the very bottom.

EXPECTED RESULTS:
A "shrink" animation should play on the folder.

ACTUAL RESULTS:

  • All of the content from the top of the page seems to snap into the current position of the scrollport
  • The folder icon gets thrown off the bottom (creating additional scrollable area)
  • If you try to scroll up, there's a bunch of blank space before the content now.

Chrome gives EXPECTED RESULTS.
Firefox Nightly 104 gives ACTUAL RESULTS.

(Note: It seems possible this is a version of https://bugzilla.mozilla.org/show_bug.cgi?id=1748891 )

Attached file testcase 2 (reduced)

Here's a reduced testcase.

STR here:

  1. Scroll the scrollable area to the bottom.
  2. Repeatedly hover/unhover the "Hover me" text.

ACTUAL RESULTS: The scrollbar shows that the scrollable area keeps getting taller (with the content all being moved to the very end).

(In reply to Daniel Holbert [:dholbert] from comment #0)

(Note: It seems possible this is a version of https://bugzilla.mozilla.org/show_bug.cgi?id=1748891 )

The interesting wrinkle here:

  • the sticky-positioned thing is also a float
  • the content that's "propping up" the furthest scrollable area is not itself sticky-positioned, though it is cleared to be below the sticky float, and that clearance seems to be necessary to trigger the bug. (In the original testcase it's cleared via width:100% which forces it below the float so that it fits; in testcase 2, I clear it explicitly via clear:both.)
Summary: Content moves down in the scrollport, when a reflow occurs, with position:sticky → Content moves down in the scrollport, when a reflow occurs, with "float:left;position:sticky" element followed by some cleared tall content

This is kind of reminiscent of bug 1797307, I wonder if it's a duplicate.

Priority: -- → P3
See Also: → 1797307
Blocks: 1959957
Duplicate of this bug: 1448995

Comment on attachment 9287106 [details]
testcase 1 (from reporter) note: depends on external cloudflare-hosted CSS libraries

Sorry, I think testcase 1 must've been the completely wrong file-attachment here. Fortunately the jsfiddle link is still valid. Let me repost a version of that.

Attachment #9287106 - Attachment is obsolete: true

Here's a bugzilla-hosted version of the jsfiddle. This still reproduces the bug for me (though testcase 2 is more reduced and probably better for reasoning about).

The jsfiddle version uses fontawesome for some icons; I replaced the fontawesome stuff with just regular descriptive text ("STEP 1... STEP 2")

Blocks: 1963302

Moving into Layout: Positioned.

Component: Layout: Scrolling and Overflow → Layout: Positioned
Blocks: 1973453
User Story: (updated)
Blocks: 1985980
Blocks: 1998156
User Story: (updated)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: