Skip to content

Add charcode to keyboard events defaults #193

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

Conversation

puemos
Copy link
Contributor

@puemos puemos commented Jan 20, 2019

What:

Add charCode to keyboard events defaults

Why:

  1. Keep the same behavior as the browser (new KeyboardEvent())
  2. solve a problem when used with Reactjs fireEvent.keyPress not fire in test react-testing-library#269

How:

Add charCode (charCode: 0) to the Keyboard Events defaults

Checklist:

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kentcdodds kentcdodds merged commit 2e4a697 into testing-library:master Jan 20, 2019
kentcdodds pushed a commit to testing-library/testing-library-docs that referenced this pull request Jan 20, 2019
@kentcdodds
Copy link
Member

🎉 This PR is included in version 3.16.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

superT999 added a commit to superT999/testing-library-docs that referenced this pull request Feb 13, 2023
web3gru pushed a commit to web3gru/testing-library-docs that referenced this pull request May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants