Material-ui: [TextField] Wrong disabled color in Safari

Created on 31 Oct 2020  路  8Comments  路  Source: mui-org/material-ui

In my case
https://prnt.sc/vane10

Please help, How to fix it?

bug 馃悰 TextField external dependency good first issue

Most helpful comment

@mtr1990 would have priority as it's thanks to him that we would be fixing this bug. If he's not interested, definitely.

All 8 comments

It doesn't look like this bug report has enough info for one of us to reproduce it.

Please provide a CodeSandbox (https://material-ui.com/r/issue-template), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.

Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

Hi @eps1lon I'm sorry,

This is link :
https://codesandbox.io/s/material-demo-forked-e8g4f?file=/demo.js

Please compare in safari and chrome, Thanks!

We would need to apply this diff to fix the opacity on Safari.

diff --git a/packages/material-ui/src/InputBase/InputBase.js b/packages/material-ui/src/InputBase/InputBase.js
index 381f3a53d1..2221a81fb2 100644
--- a/packages/material-ui/src/InputBase/InputBase.js
+++ b/packages/material-ui/src/InputBase/InputBase.js
@@ -50,6 +50,7 @@ export const styles = (theme) => {
       '&$disabled': {
         color: theme.palette.text.disabled,
         cursor: 'default',
+        WebkitTextFillColor: theme.palette.text.disabled, // Fix opacity Safari bug
       },
     },
     /* Styles applied to the root element if the component is a descendant of `FormControl`. */

However, it would also force all the customization to adapt. So the question is, will most developers want to know about this issue and update their styles accordingly?

Related: https://github.com/jgthms/bulma/issues/2355, https://github.com/carbon-design-system/carbon/issues/6673.

Yes, I think this is necessary,
Thanks for help me, It's woking!

Considering it's using the design token from the theme, I think that we can move forward, it should be fine.

can I take it?

@mtr1990 would have priority as it's thanks to him that we would be fixing this bug. If he's not interested, definitely.

@Morteza-Jenabzadeh Feel free to move forward

Was this page helpful?
0 / 5 - 0 ratings