Closed Bug 1760313 Opened 3 years ago Closed 3 years ago

background of pseudo element is hover the element background for select > option

Categories

(Core :: Graphics: WebRender, defect)

Firefox 98
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox-esr91 --- unaffected
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix

People

(Reporter: p.moirez, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image firefox_bug.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36

Steps to reproduce:

https://jsfiddle.net/518zbe3t/

I used pseudo element to show red dot if the string is below 10 characters.

In previous versions of firefox and in chrome, everything worked well.

Actual results:

All the string is red

Expected results:

AOly the dots are red (see file attached)

*Only the dots are red (see file attached)

The bug is only present with a select > option. Not with a div.

Summary: backgroundof pseudo element is hover the element background → background of pseudo element is hover the element background for select > option
Component: Untriaged → Layout
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Layout → Graphics: WebRender
Ever confirmed: true
Keywords: regression
Regressed by: 1741776

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

Flags: needinfo?(emilio)

I see. So that test-case is relying on the ::before pseudo-element getting z-sorted inside the select box, which no longer happens as a result of my patch.

It's a kind of expected behavior change, though when I wrote it I didn't realize Chromium would allow you to make the pseudo-elements of an option abspos (they don't allow you to do that with other elements that you might want to append to the <option>, so might be unintended on their side, tbh).

In any case, the approach you chose to achieve the effect is a bit complicated IMO, and could be replaced with something like this which doesn't rely on z-sorting around.

Flags: needinfo?(emilio)

Hi Emilio,
Thank you for the solution, it works perfectly!
Should i close the bug?
Thanks.

Yeah, let's close for now. If other stuff is broken due to my change we'll have to re-consider, but this specific case seems worth addressing in a separate way. Note that you might want to use overflow: hidden; instead of overflow: clip for older browsers, other than that my solution should work ~everywhere.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX

Ok, I close it.
Many thanks for your help.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: