react-stripe-js
react-stripe-js copied to clipboard
[BUG]: Need to not be able submit a form with Return Key
What happened?
I am using stripe CardElement, and when pressing Return key inside it my submit handler is called. But I have a use case here that it must not be possible submit my form with Return key (actually with any keyboard key), only with my button. As it is not possible to get keydown events from CardElement due to security matters, how can I be able to do that? I saw there exists an onEscape event when scape is pressed inside the component...could that have a onReturn so I can prevent it there? Please, show me a light in the end of the tunnel. Thanks.
Environment
No response
Reproduction
No response