Open Bug 1825392 Opened 2 years ago Updated 2 months ago

position: sticky css with transform-style: preserve-3d ancestor doesn't stick to viewport

Categories

(Core :: Web Painting, defect)

Firefox 112
defect

Tracking

()

People

(Reporter: karstenroberts, Unassigned)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0

Steps to reproduce:

I am creating a web page that utilizes position: sticky alongside a parallax effect on content using transform-style: preserve-3d.

Here is a jsfiddle demoing the issue: https://jsfiddle.net/783oetfv/1/

Actual results:

As soon as I add transform-style: preserve-3d to a parent element, the child with position: sticky no longer sticks to the top of the window when scrolled past.

In the jsfiddle, note that the right-hand column does not stick. If you remove transform-style: preserve-3d from the ancestor it does.

Expected results:

The expected result is that as I scroll past the element with position: sticky, that content sticks to the top of the window.

I have confirmed that this behaves as expected on Chrome and Safari, but on Firefox, both regular and developer edition, it does not.

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

Component: Untriaged → Web Painting
Product: Firefox → Core
Component: Web Painting → CSS Parsing and Computation

If you look at the inspector, the sticky item actually sticks (during layout at least), so this seems like a graphics or display-list building issue. Would be great to have a regression range.

Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Web Painting
Ever confirmed: true
Summary: position: sticky css tag is not respected → position: sticky css with transform-style: preserve-3d ancestor doesn't stick to viewport

:kats, since you are the author of the regressor, bug 1411627, could you take a look?

For more information, please visit auto_nag documentation.

Flags: needinfo?(kats)
Flags: needinfo?(kats)

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(tnikkel)

Botond, does this bug sound similar to any other position sticky bugs that you know of?

Flags: needinfo?(tnikkel) → needinfo?(botond)

As it happens, I was just looking at bug 1818665 earlier today, and the testcase here has a lot in common with that one (sticky element inside perspective transform seems to get mispositioned during display list building). While I can't be completely confident that this bug is a duplicate, I think there's a good chance it is, and it probably makes sense to investigate one of them first and then re-test the other.

Depends on: 1818665
Flags: needinfo?(botond)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: