insin / insin/react-maskedinput

onKeyPress and onKeyDown not working

Open
#109 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
727
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Hello, Im having a problem with onKeyPress and onKeyDown. I did create a component called Input, and have this line:

``

And Im calling the Input component like this:

``

```
handleKeyPress(event){
if(event.key === "Enter"){
this.processUserInput(event.target.name);
}

}

```
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.