Skip to content
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] Fix floatingLabelText intercepting click events #4418

Merged
merged 1 commit into from
Jun 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const getStyles = (props, context, state) => {
},
floatingLabel: {
color: hintColor,
pointerEvents: 'none',
Copy link
Member

@oliviertassinari oliviertassinari Jun 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this fix. The pointerEvents property isn't well supported by IE.
capture d ecran 2016-06-09 a 23 08 50
Actually, that's only 1% of the global traffic.
That would make official that we don't support IE < 11.
Going into this direction will also help us solve #3757. (for more details #4253 (comment)).
We would be able to remove our heuristic to generate a unique id.
Notice that this fix only works because the underlying input has a big height (that feels wrong in the first place).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliviertassinari What do you recommend instead?

Copy link
Member

@oliviertassinari oliviertassinari Jun 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the solution that we will came up with needs to address at least the three issues we have raised.
Here is what came into my mind:

TL;DR Using pointerEvents sounds like a good quick win.

},
input: {
WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
Expand Down