Closed Bug 2026109 Opened 2 months ago Closed 1 month ago

Print renders all the <option> items in a <select> element instead of the selected one only

Categories

(Core :: Printing: Output, defect)

Firefox 149
Desktop
All
defect

Tracking

()

VERIFIED FIXED
151 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox149 + verified
firefox150 --- verified
firefox151 --- verified

People

(Reporter: denyshon, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file select_element.html

In Firefox version 149, a regression has been introduced with the printing of HTML <select> elements. When printing, all <option> items inside a dropdown are displayed and included in the print output in addition to the selected one.

This behavior differs from Firefox 148, where only the selected option is rendered during print preview.

Steps to reproduce:

  1. Create an HTML page with a <select> dropdown containing multiple <option> elements (a simple testcase attached).
  2. Select one of the options.
  3. Open print preview (Ctrl + P).

Actual results:
All options inside the <select> element are displayed and printed under the selected one.

Expected results:
Only the selected option is visible and printed.

Notes:
Reproduces in the release (v149) and the latest Nightly (v151). Does not reproduce in the previous release, v148.0.2.
Originally reported on SUMO: https://support.mozilla.org/questions/1572581

[Tracking Requested - why for this release]:

Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → Desktop

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

Component: General → Printing: Output
Product: Firefox → Core

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

I am affected by this as well and was able to bisect the regression:

Last good revision: f1c75460dbfd79bbb1bb34da66b8470993e41fd9
First bad revision: b967fdc6fff3b5ee0aa58fefd18df0f66f793b28
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f1c75460dbfd79bbb1bb34da66b8470993e41fd9&tochange=b967fdc6fff3b5ee0aa58fefd18df0f66f793b28

It appears this was regressed by Bug 2011709.

Regressed by: 2011709

Set release status flags based on info from the regressing bug 2011709

:emilio, since you are the author of the regressor, bug 2011709, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Duplicate of this bug: 2026265
Flags: needinfo?(emilio)

Clone built-in stylesheets that aren't node associated: this fixes
select.css not applying which is what fixes the bug as reported.

Clone pseudo-element type (this fixes the dropmarker not showing up in
appearance: auto mode.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ae9a1488edb1 https://hg.mozilla.org/integration/autoland/rev/5047478e313f Revert "Bug 2026109 - Improve cloning internal shadow trees for printing. r=smaug" for causing wpt failures @ select-combobox-print.html

Backed out for causing wpt failures

Flags: needinfo?(emilio)
Duplicate of this bug: 2026113
Flags: needinfo?(emilio)
Duplicate of this bug: 2026505
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/58779 for changes under testing/web-platform/tests
Duplicate of this bug: 2026763
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Upstream PR merged by moz-wptsync-bot
Duplicate of this bug: 2026931

Clone built-in stylesheets that aren't node associated: this fixes
select.css not applying which is what fixes the bug as reported.

Clone pseudo-element type (this fixes the dropmarker not showing up in
appearance: auto mode.

Original Revision: https://phabricator.services.mozilla.com/D289935

Attachment #9559178 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Multiple reports, simple fix.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial tweaks to the shadow root cloning. Note that uplift also needs this test-expectations only patch: : https://github.com/mozilla-firefox/firefox/commit/e4c240892131
  • String changes made/needed?: none
  • Is Android affected?: yes
Flags: qe-verify+

Clone built-in stylesheets that aren't node associated: this fixes
select.css not applying which is what fixes the bug as reported.

Clone pseudo-element type (this fixes the dropmarker not showing up in
appearance: auto mode.

Original Revision: https://phabricator.services.mozilla.com/D289935

Attachment #9559179 - Flags: approval-mozilla-release?

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Multiple reports, simple fix.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Trivial tweaks to the shadow root cloning. Note that uplift also needs this test-expectations only patch: : https://github.com/mozilla-firefox/firefox/commit/e4c240892131
  • String changes made/needed?: none
  • Is Android affected?: yes
Duplicate of this bug: 2026657
Duplicate of this bug: 2026120
Attachment #9559178 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 2027216
QA Whiteboard: [uplift][qa-ver-needed-c151/b150]
Duplicate of this bug: 2027716

Reproducible on a 2026-03-25 Firefox Nightly build on Windows 10.

Verified as fixed on Firefox Nightly 151.0a1 and Firefox 150.0b3 on Windows 10, Ubuntu 22, macOS 15.

Duplicate of this bug: 2027858
Duplicate of this bug: 2028221
Duplicate of this bug: 2028378
Attachment #9559179 - Flags: approval-mozilla-release? → approval-mozilla-release+

Verified as fixed on Firefox 149.0.2 (treeherder build) on Windows 10, Ubuntu 22, macOS 13.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c151/b150] → [uplift][qa-ver-done-c151/b150]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: