vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
164 stars 42 forks source link

Two calendar icons are displayed for a date input in Firefox #208

Open grahamford opened 1 year ago

grahamford commented 1 year ago

Describe the bug

A date input control in Firefox displays a native browser calendar icon in addition to the cds-icon.

(Only a single cds-icon is displayed in Safari and Chrome.)

How to reproduce

View the Storybook page in Firefox https://storybook.core.clarity.design/?path=/story/forms-date--page

Screenshot 2023-01-27 at 09 58 30

Expected behavior

A single calendar icon is displayed in all browsers.

Versions

Clarity project:

Clarity version:

Framework:

Framework version:

Angular 15

Device:

Jinnie commented 1 year ago

It's a regression caused by Firefox breaking change. It was fine when I tested it with 107.0.1 and then I reproduced it in 109.0.1, after I updated my browser. We have to check how to suppress the default icon.

Jinnie commented 1 year ago

It's actually the whole native selector that needs to be prevented. It seems it does not respect the ::-webkit-calendar-picker-indicator pseudo selector anymore.

grahamford commented 1 year ago

There doesn't seem to have been any change in Firefox according to this bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1812397

Does anyone have a good workaround?