Skip to content

Submit via enter doesn't work in number field #2797

Answered by snowystinger
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Sounds like a bug, though I'm not seeing anywhere that we're mistakenly calling preventDefault from a quick glance.
We should only preventDefault if we're handling the key, but it looks like that's what we're doing.
Looked in react-aria/(textfield|spinbutton|numberfield) since those are the packages that build useNumberField
Would you mind opening an issue for this? Here's a codesandbox to reproduce it https://codesandbox.io/s/cocky-mclean-v66ml?file=/src/App.js
And it has a textfield to rule out that useTextfield is introducing the problem. Could be useFormattedTextfield though.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant