With a controlled TextField, the field loses focus when re-rendered in the precense of a Menu component elsewhere that does not have disableAutoFocus set to true. Even if the menu is not open, and has not been interacted with.
TextField to your appMenu with no disableAutoFocus prop (this will default the prop to false)TextField such that it takes focus, note that the underline appearsTextField loses focus on re-renderMenu so that disableAutoFocus is set to trueTextFieldObserve that the TextField no longer loses focus
Material-UI: 0.15.0
I'm hitting the same issue, TextField is losing focus. In my case, I have a SelectField with MenuItems. The SelectField doesn't have the disableAutoFocus property. Any other workarounds?
On further investigation, it wasn't the SelectField. I had a Menu, that was part of a Drawer. Even though the Drawer was not open it was causing the issue. Setting disableAutoFocus as has been suggested resolved it. I should also note this was not an issue in Chrome desktop. It was only a problem on Cordova/Android (didn't check iOS). When touching the TextField the keyboard would come up then immediately go away (because the Menu was taking focus) and the TextField did not have focus so you effectively could not type in the TextField.
oooohhh, jsut ran into same issue. took me aeons to debug ;-(
We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.
Finally !!!! After spending hours on trying to debugging this and going all over the place in redux-forms this finally came to this which fixed the exact same issue for me too !