Closed Bug 1695475 Opened 3 years ago Closed 4 months ago

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

Categories

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

Firefox 86
defect

Tracking

()

RESOLVED DUPLICATE of bug 1744363

People

(Reporter: k08045kk, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(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
Status: UNCONFIRMED → NEW
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).

The testcase in comment 0 looks good in print-preview in Nightly 122.0a1 (2023-12-06) after bug 1744363 is fixed.

Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1744363
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: