Closed Bug 1782623 Opened 2 years ago Closed 2 years ago

Scrollbar thumb nearly disappears when hovered in <select> dropdown, with dark mode and dom.forms.select.customstyling set to true

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

VERIFIED FIXED
105 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox-esr102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- verified

People

(Reporter: dholbert, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(7 files)

STR:

  1. Set dom.forms.select.customstyling to true and choose Website appearance: Dark in Firefox Preferences.
  2. Load attached testcase
  3. Click the dropdown arrow, and hover the scrollbar thumb (the main draggable part)

ACTUAL RESULTS:
The hovered scrollbar-thumb turns nearly the same color as the background, making it nearly invisible.

EXPECTED RESULTS:
Hovered scrollbar-thumb should remain visible, and if anything should look more "active".

I ran into this in-the-wild at https://pptform.state.gov/ , the US Government's form for filling out a printable passport-renewal application. (My passport happens to be up for renewal and I got a reminder about it today.) One of the fields in their process happens to have a dropdown menu with some styling that makes it have this issue.

STR at that site:

  1. As above, be sure you have dom.forms.select.customstyling set to true and Website appearance set to Dark in Firefox preferences.
  2. Visit https://pptform.state.gov/
  3. Click through the read-our-terms-etc. disclaimer page.
    [it may takes a while for the next page to load, due to some server-side stuff happening]
  4. Hover "Fill out online & Print" at bottom right, and click the "Submit" button.
  5. Click the dropdown menu for e.g. Country Of Birth or State/Territory Of Birth
  6. Hover the scrollbar thumb on the dropdown.

ACTUAL RESULTS:
[same as reduced-testcase STR] The thumb nearly disappears when hovered.

EXPECTED RESULTS:
[same as reduced-testcase STR] Hovered scrollbar-thumb should remain visible, and if anything should look more "active".

mozregression with the reduced testcase indicates that this behavior started (i.e. the thumb started disappearing when hovered) with range
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=578715b6d3fcb21c0b61996347260ef9b119d0d2&tochange=8508c35e49793fbe402ad2a706a57fabd1c2b0c4

In that range, I suspect this would've been

Bug 1707872 - Make GTK theme follow the firefox theme globally

Marking as regression from that.

Attachment #9288015 - Attachment description: testcase 1 → testcase 1 (select with custom `background`)

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

:emilio, since you are the author of the regressor, bug 1707872, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Looking at the Passport-renewal "in-the-wild" site, it looks like the relevant factor there is just a custom color on a select element -- the color declaration here:

https://pptform.state.gov/common/stylesheet.css

td.field span,
td.field input, 
td.field select, 
td.field table tbody tr td label {
	FONT-SIZE: .77em;
    COLOR: #262626;
    TEXT-DECORATION: none;
    /*border:solid 1px red;*/
    text-align: left;
    margin: 0px 5px 0px 0px; }

This seems to cause trouble regardless of how dark or light the color is, too. E.g. this testcase shows that it happens just-the-same, with a near-black as well as a near-white color. (The near-white text is hard to read, but don't focus on that; the point is that we style the hovered-scrollbar in a broken way, when a custom text color is chosen, and it's broken in the same way regardless of the brightness/darkness of the custom text color.)

Attachment #9288017 - Attachment description: screenshot of testcase 2 showing nearly-invisible scrollbar thumb → screenshot of testcase 2 showing nearly-invisible hovered scrollbar thumb (with the near-black custom text color)
Attachment #9288016 - Attachment description: testcase 2: default styling except with rgb(1,1,1) as the 'color' → testcase 2: select with near-black vs. near-white vs. default as the 'color' value

Assuming this is 'wontfix' for ESR releases, since this only affects Linux users with the nondefault not-exposed-in-UI dom.forms.select.customstyling:true configuration, which is probably a small-set of power-users with ~zero overlap with ESR. (And the bad-outcome is a UI annoyance, not anything catastrophic on an ESR-uplift-level.)

(Nonetheless: worth fixing in general, in the interests of maybe-someday being able to ship the true configuration, though it seems plans around that are hazy given the comment at https://searchfox.org/mozilla-central/rev/c2a2bf5a49626d63c4c0a5be42b6a93838c1b595/modules/libpref/init/all.js#910-911 )

Assignee: nobody → emilio
Flags: needinfo?(emilio)

This patch shouldn't change behavior. The Cocoa changes in particular
just save useless frame tree walks, since ThemeColors already computes
the color scheme in ColorSchemeForWidget.

This makes us use light or dark select popups on supported platforms
based on the background of the select element, which allows us to use
the right scrollbar color.

Depends on D153424

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55b84c9eac32
Rename nsNativeTheme::IsDarkBackground to IsDarkBackgroundForScrollbar, and clean up a bit surrounding code. r=dholbert
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/469683bb7d81
Set select color-scheme based on child background. r=dholbert
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Blocks: 1782858

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox104 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Regressions: 1784855
Flags: qe-verify+

I managed to reproduce this issue on Firefox 104.0(build ID: 20220818191623) on Ubuntu 22.04, using the STR and testcase from the Description. Verified as fixed on Firefox 105.0b5(build ID: 20220830185924) and Nightly 106.0a1(build ID: 20220831215447) on Ubuntu 22.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1789036
Regressions: 1791219
Blocks: 1825958
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: