#toaster-PE-submit
1 messages · Page 1 of 1 (latest)
Hey there, I don't think Payment Element should prevent this since you are creating and handling the submit yourself. However, I haven't tested this so it is possible it is prevented. Can you share your code for how you are triggering the submit here?
I can share my code but Stripe's official example exhibits the same problem: https://stripe.com/docs/payments/quickstart . Try hitting enter while a textfield has focus -- there's no effect, but clicking the button submits the form.
That example isn't set up to handle hitting enter to submit though, no? It is submitting on click as you stated.
Even the validation of the fields doesn't occur when pressing enter though, which I expect to happen, because it does happen when clicking the button.
The same behavior is seen in Stripe's downloadable Go example from that page (via the "Download full app" button).
So in short I see the same behavior in 3 places: my own implementation, Stripe's hosted example, and Stripe's downloadable example. So it really looks like it doesn't work.
Oh and the enter key works fine on Stripe's hosted example for the Card Element here: https://stripe.com/docs/payments/card-element
Huh okay, like I said I haven't tested it, but the fact that it works on card Element and not Payment Element is definitely a strong indication that it may indeed not work with Payment Element. I'll need to play with it later and then submit a ticket internally to see if we can adjust anything to support it (assuming it indeed doesn't work for PE with current state of PE).
Cool thank you for your help! Can I follow up somehow?
Yep, go to https://support.stripe.com/contact/email and fill out the form to create a support ticket. Provide details about your issue and mention me (bismarck) in your message. Let me know when you've submitted the form so I can grab your ticket and then I can follow up later.
Rad, thanks so much!
I grabbed the ticket — I'll follow up over email later today!