Open Bug 1518943 Opened 5 years ago Updated 2 years ago

Flexbox layout panel doesn't get populated when an element dynamically gets "display:flex" styling via e.g. media query starting to apply

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file testcase 1

The attached testcase has a CSS that makes an element "display:flex" if we're wider than 800px, or "display:block" if we're skinnier.

STR:

  1. View attached testcase, with a viewport that is at least 800px wide (at least as wide as the blue bar in the testcase).

  2. Right click the black bordered area & choose "inspect".
    --> note that Flexbox section in layout panel is populated with flexbox info.

  3. Shrink your browser viewport to less than 800px wide.
    --> note that the flexbox section gets cleared (correctly) and the "flex" label is dropped in inspector.

  4. Grow your browser viewport to be more than 800px wide again.

ACTUAL RESULTS:
The flexbox section in the layout pane doesn't get repopulated. It still says "Select a Flex container or item to continue". (And I do have a Flex container selected!)

EXPECTED RESULTS
The flexbox section in the layout pane should be repopulated when my viewport goes back above 800px.

(Victoria encountered this in the wild at https://www.nytimes.com/subscription.html with the <header class="universalNav ...">element -- that element gets its flexbox styling in a (min-width: 768px) media query.)

Summary: Flexbox layout panel doesn't get populated when an element dynamically becomes a flexbox via e.g. media query starting to apply → Flexbox layout panel doesn't get populated when an element dynamically gets "display:flex" styling via e.g. media query starting to apply
Attached video screencast of bug

Here's a modified version of the testcase, using grid rather than flex.

I can't repro with this version -- i.e. the grid panel repopulates itself correctly (nice!). So there's something we're doing for grid that we're forgetting to do for flexbox here.

Thanks Daniel.

Priority: -- → P2
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: