Open Bug 1695475 Opened 2 years ago Updated 3 months ago

If an element in a flexbox is pre-paginated with `page-break-inside: avoid;`, it may be printed overlapping with subsequent elements


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

Firefox 86




(Reporter: k08045kk, Unassigned)


(Blocks 1 open bug)


(Keywords: testcase)


(2 files)

Attached file print-flexbox.html

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

Steps to reproduce:

  1. View the attached print-flexbox.html
  2. Press [Ctrl+P] to print (Print Preview or Create PDF)

Actual results:

If an element in a flexbox is pre-paginated with page-break-inside: avoid;, it will extend out of the flexbox area. Elements that extend beyond the flexbox area will be overlapped by subsequent elements.
I think that the flexbox area is not aware of the expansion of the area due to page breaks within flexbox.

Expected results:

Even if an element in a flexbox is pre-paginated with page-break-inside: avoid;, it will not extend beyond the flexbox area. Also, it will not overlap with subsequent elements.

Attached file print-flexbox.pdf

PDF file created with the print function of Firefox86.0

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
Severity: -- → S3
Ever confirmed: true
Keywords: testcase
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
Depends on: 1739561
No longer depends on: 1739561

I can confirm this - it just happened to me, and it produces some truly weird-looking behaviour:
(I'm using Firefox 107.0.1)

Relatedly, Firefox doesn't support "break-after:page" when printing, if any ancestor is "flex".
I think it should support this - as indeed Chrome does.
(However, if the spec says no, then it would really help the user if Fx could at least emit a notice).

See Also: → 1807406
You need to log in before you can comment on or make changes to this bug.