[Menu] Input fields not selectable on iPhone Chrome
Problem Description
On a small site I imported material-ui, there are some simple html input tags, when I place this simple code to anywhere:
<Menu >
<MenuItem />
</Menu>
This makes any input fields not selectable, even so when the input is not related to the menu code, both can be on the body, or nth children of different divs. When I tap any input field, the mobile device's keyboard pops out then right after it hides the keyboard and unfocus the input field.
The problem only comes up on iPhone Chrome, it works on the iPhone Safari and on Desktop Chrome (no bugs using any device mode on desktop).
Versions
- Material-UI: 0.15.0-alpha.2
- React: 15
- Browser: iPhone 5 Chrome (iPhone Safari works)
@valentinvichnal what version of chrome on iphone?
@nathanmarks Sorry I forgot to write, 49.0.2623.109
Found the problem, this small code was the cause of this:
componentDidMount() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
}
handleResize() {
const windowWidth = window.innerWidth;
this.setState({windowWidth});
}
Mobile Chrome may resize the window width when displays the keyboard, this event handler interrupts it somehow. But I don't get it how it is related to the MenuItem component...