Open Bug 1739506 Opened 3 years ago Updated 3 years ago

{inc} Rendering issue involving display: flow-root, display: flex and float: right

Categories

(Core :: Layout: Flexbox, defect)

Firefox 93
defect

Tracking

()

People

(Reporter: matma.rex, Unassigned)

Details

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

See attached test case.

Actual results:

The translucent blue rectangle overlaps the green rectangle. (see attached screenshot)

In other words, elements with "display: flex" placed inside an element with "display: flow-root" have incorrect width when rendered alongside elements with "float: right" and uneven widths.

Expected results:

The translucent blue rectangle should be less wide, so as to not overlap the green rectangle. (see attached screenshot)

Also, the rendering seems to be non-deterministic. After modifying the DOM using the inspector, or zooming in and out, I see the expected result, until I refresh the page. (see attached video)

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Flexbox' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Flexbox
Product: Firefox → Core

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(aethanyc)

Thank you for the bug report. I can reproduce this bug, and I confirm comment 3 that after zooming in or out, Firefox Nightly (2021-11-22) yields the expected result in comment 0.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(aethanyc)
Summary: Rendering issue involving display: flow-root, display: flex and float: right → {inc} Rendering issue involving display: flow-root, display: flex and float: right

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(jfkthame)

It looks like during the initial reflow, the display: flow-root element computes its width allowing for only the first of the floats; perhaps because it hasn't yet figured out that its height is such that it will actually impinge on the second float as well, and so needs to take account of that too.

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

Attachment

General

Created:
Updated:
Size: