-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[TextField] Required TextField has a red border in Firefox #7887
Comments
@chamun Are you able to reproduce the same issue on the v1-beta branch? |
I guess this falls under the "it's a feature, not a bug" category. FF (and also other browsers) have custom error displays. You can turn those off by (1) Adding a input:invalid {
box-shadow:none;
}
/*
* It's also possible to overwrite the styles for certain validation rules.
*/
input:required {
box-shadow:none;
} Note that you should always put your user inputs in a EDIT: BTW, I can reproduce the describe behavior on the documentation pages by just changing the HTML via dev tools. |
I don't know how to test it using the the v1-beta branch, if you provide or point me to instructions I can give it a shot. Anyways, I tested with version 1.0.0-beta.6 and could not reproduce the issue. I installed it using |
I get your point, but since this project intends to implement the Material Design specification, as a user I would expect it to overwrite any browser style that gets in the way of what the specification defines. |
@chamun second that, was just suggesting a temporary fix, if needed :) |
Reproduction with v1-beta: I have been benchmarking what other do. So I think that we should move @sebald workaround in the core of the library:
What do you think? |
Problem description
Firefox adds a red border to an input that is required even before the user has interacted with it:
The issue is inherited by
<TextField />
:I can get rid of this border by adding the
box-shadow:none
property to aninput:invalid
selector.Example:
Is this something that can be incorporated to Material-UI?
Versions
The text was updated successfully, but these errors were encountered: