Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(field): field borders now are correctly colored even on Safari #5737

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

l0ll098
Copy link

@l0ll098 l0ll098 commented Oct 23, 2024

Hi there! This is a small patch to fix an annoying bug that occurs with Fields on Safari, both on macOS and iOS.

As also described in issue #5668, Fields such as <md-outlined-text-field> and <md-outlined-select>, when focused, show an underlying dark line, even if the primary theme color is set to something else. This patch addresses said issue.

Here you can take a look at what is going on with the latest version of this library (v2.2.0 at this moment).

If you look carefully at the focused input in the first screenshot, you'll see that dark line just beneath the label, whereas all other parts of that input are brown-ish.
The second image shows the resulting page after having applied this patch. Here you can see how the dark line is no longer visible and all parts of the input border have the same color.

Before patch After being patched

Even though these screenshots were captured on a iOS 18 Simulator, I've seen this issue both on real iOS devices, and previous versions of iOS Simulators. The same issue also occurs on Safari on macOS.
Moreover, every recent version of @material/web seems to be affected by this bug.

@asyncLiz could you take a look at this PR?

PS: Thanks for the awesome project!


Fixes: #5668

TextFields and Selects on Safari were showing a dark line, even when primary color was different.
Fixes: 5668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text Field Outline/Border Color breaks under Label into a Black Segment
1 participant