-
Notifications
You must be signed in to change notification settings - Fork 227
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
Text-Field setState problem #275
Comments
@benn983 I tried running your component in a test app. I attached it in the issue. directions
browser should open to localhost:3000. It looks like text field is working as designed. My only confusion is what your |
@moog16 I tried this using the device toolbar in chrome and on a real mobile device and can reproduce that there. It is impossible to set any value. The Problem is present in 0.5 and 0.4.2 as well. |
The problem seems to be in setTransformOrigin(evt) {
const targetClientRect = evt.target.getBoundingClientRect();
const evtCoords = {x: evt.clientX, y: evt.clientY}; // not present on mobile
const normalizedX = evtCoords.x - targetClientRect.left; // this is NaN
this.adapter_.setLineRippleTransformOrigin(normalizedX); // passing here null or a proper number works.
} The foundation is using the same event listener for ['mousedown', 'touchstart'].forEach((evtType) => {
this.adapter_.registerInputInteractionHandler(evtType, this.setPointerXOffset_);
}); To fix that it should use |
@sashless - got it. It looks like I can also reproduce on Mac OSx Chrome when you use the mobile mode. We'll start investigating |
This is actually an MDC Web bug: I've filed here: material-components/material-components-web#3643. In the interim until that is fixed in MDC Web, I think we can get around this by checking
This will unfortunately remove this feature for mobile browsers, but at least it won't throw an error. |
Hi the textField component gives me this error when i click on it. This error is fired only with the standard component. Whit the outlined all works correctly apart for the style(i think I'm wrong there).
This is my code
the error:
The piece of code:
<TextField className="search" label={props.text} trailingIcon={<MaterialIcon icon="search" />} > <Input value={props.value} onChange={event => props.change(event); } /> </TextField>
The text was updated successfully, but these errors were encountered: