React material border still showing under label on focus for outlined variant
See original GitHub issueOutlined textfield not focused
Outlined textfield focused
<TextField
id="full_name"
label="Full Name"
margin="dense"
autoComplete="new-password"
value={leadPayload.full_name}
onChange={this.handleChange}
/>
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Current Behavior
Steps to Reproduce
Link:
Context
Your Environment
Tech | Version |
---|---|
Material-UI | “@material-ui/core”: “^3.2.2” |
React | “react”: “^16.5.2” |
Browser | Chrome |
TypeScript | |
etc. |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
React material border still showing under label on focus for ...
React material border still showing under label on focus for outlined variant #13297. bug 🐛 Something isn't working component: text field.
Read more >Material-UI TextField Outline Label is overlapping with border ...
Notice the border has rendered incorrectly and is causing the label to overlap with the border. For correct behavior initialize newUser with a ......
Read more >outline - CSS: Cascading Style Sheets - MDN Web Docs
Outline is a line outside of the element's border. Unlike other areas of the box, outlines don't take up space, so they don't...
Read more >Text fields - Material Design
Outlined text field without labels. Filled text fields can display the following states: inactive, activated, focused, hover, error, and disabled.
Read more >Select API - Material UI - MUI
Name Type Default
autoWidth bool false
children node
classes object
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a similar issue with the border striking through the label for a select input. The solution I found in the demos uses
ReactDOM.findDOMNode(labelRef).offsetWidth
to setlabelWidth
as it is a required prop(it’s actually the width of the element that hides the outline under the label), but I couldn’t get it to work with refs. I ended up using<TextField select> {...mappedOptions} </TextField>
as shown in the examples here and it works great.I have same problem on Safari (macbook, ipad). maps.mirlk.ru
And no problem on Chrome: