Closed Bug 2014604 Opened 2 months ago Closed 2 months ago

[regression] text of form element <select> is invisible

Categories

(Core :: Layout: Form Controls, defect, P2)

defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox147 --- unaffected
firefox148 --- unaffected
firefox149 --- fixed

People

(Reporter: felix.bau, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

I'm using Zammad (ticketing system).
The currently selected option of a <select> (its text) stays invisible since Bug 2011709 was merged.
If I select a new option, the text will show up.

I ran mozregression to find the commit that caused this regression.
If you need further information on this, feel free to hit me up.
I'm looking forward to testing possible fixes with autoland builds :)

2026-02-05T00:23:47.908000: INFO : Narrowed integration regression window from [77fb91cd, b967fdc6] (3 builds) to [bcfad2c4, b967fdc6] (2 builds) (~1 steps left)
2026-02-05T00:23:47.924000: DEBUG : Starting merge handling...
2026-02-05T00:23:47.924000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=b967fdc6fff3b5ee0aa58fefd18df0f66f793b28&full=1
2026-02-05T00:23:47.925000: DEBUG : redo: attempt 1/3
2026-02-05T00:23:47.926000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=b967fdc6fff3b5ee0aa58fefd18df0f66f793b28&full=1',), kwargs: {}, attempt #1
2026-02-05T00:23:47.927000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2026-02-05T00:23:49.115000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=b967fdc6fff3b5ee0aa58fefd18df0f66f793b28&full=1 HTTP/1.1" 302 0
2026-02-05T00:23:50.979000: DEBUG : urllib3.connectionpool: https://hg-edge.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=b967fdc6fff3b5ee0aa58fefd18df0f66f793b28&full=1 HTTP/1.1" 200 None
2026-02-05T00:23:51.007000: DEBUG : Found commit message:
Bug 2011709 - Make combobox select use a shadow tree for its contents. r=jjaschke,layout-reviewers,firefox-style-system-reviewers,accessibility-platform-reviewers,smaug,Jamie,jfkthame,dshin

For now, replicate the label + icon structure.

Use pseudo-elements for them. We could use select.css instead, but we
need a way to to prevent the display fix-up from applying (this is
needed because otherwise <select style=display:flex> starts getting the
label and button on different lines), and pseudo-elements is easier.

Use a <span> for the icon since we basically otherwise have a hidden,
unfocusable button and it simplifies the styling that way.

Use the same for the input file content since it simplifies the logic on
the frame constructor.

nsListControlFrame gets some clean-up as well since I was trying to make
sense of nsISelectFrame, but I could split that out if needed.

Tests for bug 323656 fail now because it tests explicit inheritance from
the <select> to the <option>, and now that goes through a <slot>.

Other elements have the same issue, see
https://github.com/whatwg/html/issues/3748. So for now remove those
tests.

Differential Revision: https://phabricator.services.mozilla.com/D280041

2026-02-05T00:23:51.009000: DEBUG : Did not find a branch, checking all integration branches
2026-02-05T00:23:51.009000: INFO : The bisection is done.
2026-02-05T00:23:51.010000: INFO : Stopped

Flags: needinfo?(emilio)
Attachment #9542564 - Attachment description: Zammad - selected text is invisible → after - selected text is invisible
Keywords: regression
Regressed by: 2011709

Thanks for filing! A way to reproduce this would be great. Do you know if there's a demo page or something that I could use? Otherwise debugging this is a bit tricky :)

Flags: needinfo?(felix.bau)

I found this demo site
log in as the demo agent, open one of the tickets and then view the select elements in the column on the right

https://zammaddemo.agitos.de/

Flags: needinfo?(felix.bau)

It seems this is a somewhat-known behavior of our implementation (see
the comments before the code I just added).

Basically the parser inserts an (empty) <option selected>, but then
doesn't notify when it appends the option text, so we fail to update the
value. Since validation and such deals with it in DoneAddingChildren,
seems fair to do the same here.

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

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

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/adf12b1d419e https://hg.mozilla.org/integration/autoland/rev/98d125031099 Prevent empty select when inserting with selected attribute via the parser. r=dom-core,smaug
Severity: -- → S2
Priority: -- → P2
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/57613 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Upstream PR merged by moz-wptsync-bot

Thanks a lot for the fix, works like a charm :)

QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: