-
-
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] Autofill detection not working in production #26449
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This issue still reproducing |
why are you closing this issue, that #22488 issue has been closed, its not duplicate, dont you even try the author's code? before closing this issue, OMG.... Please reopen it. Its critical bug on production, my version is
|
This comment has been minimized.
This comment has been minimized.
index 1dcc7687c3..ceff2a66a0 100644
--- a/packages/material-ui/src/InputBase/InputBase.js
+++ b/packages/material-ui/src/InputBase/InputBase.js
@@ -485,8 +485,8 @@ const InputBase = React.forwardRef(function InputBase(inProps, ref) {
<React.Fragment>
<GlobalStyles
styles={{
- '@keyframes mui-auto-fill': {},
- '@keyframes mui-auto-fill-cancel': {},
+ '@keyframes mui-auto-fill': { from: {} },
+ '@keyframes mui-auto-fill-cancel': { from : {} },
}}
/>
<Root My bad, was testing in dev mode 🤦 This didn't help as well, so I propose we go with: index 1dcc7687c3..ceff2a66a0 100644
--- a/packages/material-ui/src/InputBase/InputBase.js
+++ b/packages/material-ui/src/InputBase/InputBase.js
@@ -485,8 +485,8 @@ const InputBase = React.forwardRef(function InputBase(inProps, ref) {
<React.Fragment>
<GlobalStyles
styles={{
- '@keyframes mui-auto-fill': {},
- '@keyframes mui-auto-fill-cancel': {},
+ '@keyframes mui-auto-fill': { from: { display: 'block' } },
+ '@keyframes mui-auto-fill-cancel': { from: { display: 'block' } },
}}
/>
<Root We already have that as a style on the |
I recently made the
I filed an issue here: #39539 I think that switching from |
In production, the TextField label is not shrunk when using autofill:
Demo: https://jsfiddle.net/284y3evu/
Steps to reproduce:
It works fine with development bundles. Same demo, with only Emotion and Material-UI changed to development versions: https://jsfiddle.net/284y3evu/1/
The cause of this issue seems to be that in production the
@keyframes mui-auto-fill
declaration is removed from the styles. Adding some styles to the keyframes (InputBase.js:488) fixes the issue, for example:But perhaps there's a better solution. Maybe somthing can be changed in Emotion configuration.
The text was updated successfully, but these errors were encountered: