-
Notifications
You must be signed in to change notification settings - Fork 197
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
onKeyPress and onKeyDown not working #109
Comments
Did you get this to work? I am stuck with the same problem. |
Not really, I had to use KeyUp instead. |
Im having the same issue, can anyone help please |
Similar issue here. |
You can find the solution here: https://gist.github.com/krambertech/76afec49d7508e89e028fce14894724c
|
Hello, Im having a problem with onKeyPress and onKeyDown. I did create a component called Input, and have this line:
<MaskedInput id="message" mask={this.props.mask} type={this.props.type} className="inpt inpt-default" placeholder={this.state.text} onBlur={this.onBlur} onFocus={this.onFocus} name={this.props.name} onChange={this.onChange} onKeyPress={this.props.onKeyPress} value={this.state.message}/>
And Im calling the Input component like this:
<Input ref="input" type="phone" name="phone" mask="(11) 11111 1111" onClick={this.inputOnClick} onKeyPress={this.handleKeyPress}/>
I know that my handleKeyPress function is working for two reasons, first, is working at other regular inputs, second, I had replaced use onKeyPress={this.props.onKeyPress} for onKeyUp={this.props.onKeyPress} and worked.
The text was updated successfully, but these errors were encountered: