@@ -28,6 +28,14 @@ export const styles = theme => {
28
28
} ;
29
29
30
30
return {
31
+ '@global' : {
32
+ '@keyframes mui-auto-fill' : {
33
+ from : { } ,
34
+ } ,
35
+ '@keyframes mui-auto-fill-cancel' : {
36
+ from : { } ,
37
+ } ,
38
+ } ,
31
39
/* Styles applied to the root element. */
32
40
root : {
33
41
// Mimics the default input display property used by browsers for an input.
@@ -87,7 +95,7 @@ export const styles = theme => {
87
95
// Make the flex item shrink with Firefox
88
96
minWidth : 0 ,
89
97
width : '100%' , // Fix IE 11 width issue
90
- animationName : '$ auto-fill-cancel' ,
98
+ animationName : 'mui- auto-fill-cancel' ,
91
99
'&::-webkit-input-placeholder' : placeholder ,
92
100
'&::-moz-placeholder' : placeholder , // Firefox 19+
93
101
'&:-ms-input-placeholder' : placeholder , // IE 11
@@ -119,15 +127,9 @@ export const styles = theme => {
119
127
} ,
120
128
'&:-webkit-autofill' : {
121
129
animationDuration : '5000s' ,
122
- animationName : '$ auto-fill' ,
130
+ animationName : 'mui- auto-fill' ,
123
131
} ,
124
132
} ,
125
- '@keyframes auto-fill' : {
126
- from : { } ,
127
- } ,
128
- '@keyframes auto-fill-cancel' : {
129
- from : { } ,
130
- } ,
131
133
/* Styles applied to the `input` element if `margin="dense"`. */
132
134
inputMarginDense : {
133
135
paddingTop : 4 - 1 ,
@@ -387,9 +389,7 @@ const InputBase = React.forwardRef(function InputBase(props, ref) {
387
389
388
390
const handleAutoFill = event => {
389
391
// Provide a fake value as Chrome might not let you access it for security reasons.
390
- checkDirty (
391
- event . animationName . indexOf ( 'auto-fill-cancel' ) !== - 1 ? inputRef . current : { value : 'x' } ,
392
- ) ;
392
+ checkDirty ( event . animationName === 'mui-auto-fill-cancel' ? inputRef . current : { value : 'x' } ) ;
393
393
} ;
394
394
395
395
React . useEffect ( ( ) => {
0 commit comments