-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 variant outlined's border color doesn't change when focus on mobile #16149
Comments
@punnadittr Thanks for reporting this regression between v3.9.3 and v4.0.2. This seems to be a specificity issue in JSS (cc @kof) but I can't track down when it happened. The following diff fixes the problem: diff --git a/packages/material-ui/src/OutlinedInput/OutlinedInput.js b/packages/material-ui/src/OutlinedInput/OutlinedInput.js
index e15bbea9a..6799212d4 100644
--- a/packages/material-ui/src/OutlinedInput/OutlinedInput.js
+++ b/packages/material-ui/src/OutlinedInput/OutlinedInput.js
@@ -18,8 +18,9 @@ export const styles = theme => {
return {
/* Styles applied to the root element. */
root: {
position: 'relative',
'& $notchedOutline': {
borderColor,
},
'&:hover $notchedOutline': {
borderColor: theme.palette.text.primary,
- // Reset on touch devices, it doesn't add specificity
- '@media (hover: none)': {
+ },
+ // Reset on touch devices, it doesn't add specificity
+ '@media (hover: none)': {
+ '&:hover $notchedOutline': {
borderColor,
},
},
'&$focused $notchedOutline': {
borderColor: theme.palette.primary.main,
borderWidth: 2,
}, I can't find any other occurrences of the problem in the codebase, I believe this patch is safe to apply. Do you want to submit a pull request? |
Is it this cssinjs/jss#1045 ? |
I'm wondering if the |
@oliviertassinari |
a clear reduced reproduction anyone with JSS core? |
@arminydy Sounds like you have an issue in your environment.
If you want to give it a shoot, we will be happy to review your pull request :). The issue was labeled "good first issue". It's low-hanging fruit. Meaning, the core team won't be working on it, so we can work on issues we are uniquely positioned to address. |
-Desc: highlight TextField varient outlines border color on focus event on mobile
@oliviertassinari I followed your guidance, it works like a charm now :) , I will appreciate if you could have a quick look on this PR. Thanks. |
-Desc: highlight TextField varient outlines border color on focus event on mobile
* -ticket: #16149 (comment) -Desc: highlight TextField varient outlines border color on focus event on mobile * -ticket: #16149 (comment) -Desc: highlight TextField varient outlines border color on focus event on mobile * reduce specificity
Expected Behavior 🤔
The outlined border color should change from grey to primary color (when focus) across all breakpoints
Current Behavior 😯
On mobile (both devtools and android chrome), the border color won't change to primary color when focusing
Steps to Reproduce 🕹
It occurs in my own project but I noticed that it occurs on Mui doc as well
Link: https://material-ui.com/components/text-fields/
Your Environment 🌎
Tested on Android Chrome with my own phone and Linux Chrome
The text was updated successfully, but these errors were encountered: