Focus *picker inputs on tap
Closed this issue · 1 comments
IsaiahPacheco commented
Problem description
For iOS tablet and phones (safari and chrome) I found that if you focus on a form "TextField" input, before tapping on or a opening a DatePicker or TimePicker, the focus will persist on the last input. To fix this on iOS:
I added the "onTouchTap" property to the *Picker
onTouchTap={this.excuseKeyboard}
and implemented component method (bound to component)
excuseKeyboard(event) {
event.target.focus();
}
Without this the picker will open with keyboard open and I think would be more useable out of the box with this done automatically (only tested on iOS).
Versions
- Material-UI: 0.17.0 - 0.16.x
- React: 15.x
- Browser: iOS 10.x, mobile chrome and safari (ipad/iphone7/iphone6plus)
oliviertassinari commented
Closing for #4787