-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE Edge - TextField placeholder doesn't disappear when field is not focused #15183
Comments
Could it be a regression? We have a dedicated logic for it. |
I have tried with Edge 18. It's working fine. |
@rodrigolabs Could you provide us more information on the reproduction. IE 11 issue seems to be "normal" the browser hides the placeholder once the input is focused. Edge is good on our side. |
I'm closing for now. |
Thanks for the replies :) Well, I've just recorded a new reproduction. I don't know if you guys were testing as expected, but this is what I did:
See the new preview, tested with Edge: |
@rodrigolabs This is the only workaround I can find: --- a/packages/material-ui/src/InputBase/InputBase.js
+++ b/packages/material-ui/src/InputBase/InputBase.js
@@ -104,7 +104,10 @@ export const styles = theme => {
'&::-webkit-input-placeholder': placeholderHidden,
'&::-moz-placeholder': placeholderHidden, // Firefox 19+
'&:-ms-input-placeholder': placeholderHidden, // IE 11
- '&::-ms-input-placeholder': placeholderHidden, // Edge
+ '&::-ms-input-placeholder': {
+ ...placeholderHidden,
+ color: 'transparent',
+ }, // Edge
'&:focus::-webkit-input-placeholder': placeholderVisible,
'&:focus::-moz-placeholder': placeholderVisible, // Firefox 19+
'&:focus:-ms-input-placeholder': placeholderVisible, // IE 11 But we lose the opacity animation. What do you prefer? |
@oliviertassinari it seems that if we put a const placeholderHidden = {
opacity: 0 !important,
}; I think we won't lose the opacity animation with that. What's your opinion? |
@rodrigolabs wow, that's awesome! I confirm the resolution. Do you want to submit a pull request? :) |
@oliviertassinari Sure, I'll be happy to do that! :) |
This seems to have regressed when using Preact on Chrome. |
Expected Behavior 馃
Placeholder should disappear when the field is not focused (IE Edge).
Current Behavior 馃槸
Placeholder and Label are being displayed over top of each other.
Steps to Reproduce 馃暪
As this is easy to reproduce, I've recorded a gif so we can easily see below.
Access the link listed below from a IE Edge browser.
Link:
Context 馃敠
I found this bug trying to access an application that uses 2FA. When It asked to paste the received code, I've clicked outside the window and realized that bug.
Your Environment 馃寧
The text was updated successfully, but these errors were encountered: