Skip to content

Commit

Permalink
[TextField] Fix for floating label element not allowing focus
Browse files Browse the repository at this point in the history
This is a regression bug from mui#2078
  • Loading branch information
pandaiolo committed Nov 21, 2015
1 parent 80548a8 commit 18f404d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ const TextField = React.createClass({
bottom: 'none',
opacity: 1,
zIndex: 1, // Needed to display label above Chrome's autocomplete field background
cursor: 'text',
transform: 'scale(1) translate3d(0, 0, 0)',
transformOrigin: 'left top',
});
Expand Down Expand Up @@ -309,7 +310,8 @@ const TextField = React.createClass({
let floatingLabelTextElement = floatingLabelText ? (
<label
style={this.prepareStyles(styles.floatingLabel, this.props.floatingLabelStyle)}
htmlFor={inputId}>
htmlFor={inputId}
onTouchTap={this.focus}>
{floatingLabelText}
</label>
) : null;
Expand Down

0 comments on commit 18f404d

Please sign in to comment.