#bachir_unexpected

1 messages ยท Page 1 of 1 (latest)

summer raftBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1217506123603771492

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

torpid quailBOT
bronze timber
#

Hi ๐Ÿ‘‹

I'm sorry but your description doesn't give me much to go on. Can you start by explaining what Stripe product you are integrating?

velvet dragon
#

Hi, sorry about that, didn't have much place : we are integrating Stripe Express Checkout

bronze timber
#

Or that the modal doesn't autoscroll to the error content?

velvet dragon
#

This is what is expected (This time we click on the "Donate" button, which triggers the normal handleSubmit of the form)

#

I realize this might be an issue with react-hook-form, but since the issue only happens with ApplePay and not GooglePay, I thought you might have an idea

bronze timber
#

Okay, correct me if I'm wrong but that doesn't have to do with launching the Apple/Google pay modal, correct?

velvet dragon
#

no, it is expected that the modal doesn't open in this case since the form validation failed (hence I do not call event.resolve in the onClick handler because of that)

bronze timber
#

Okay and what are you using for form validation (since that isn't part of the Express Checkout Element)?

velvet dragon
bronze timber
velvet dragon
#

Okey so this means we would allow the applepay modal to open, then do the form validation in the onConfirm handler of the ECE ? Wouldn't that be less user friendly ?

bronze timber
#

Oh wait, sorry no that isn't were you would place the logic. You are right.

#

Your form validation appears to handle this correctly currently (except for the scrolling part). Is there a way you can hook into that logic and add the scolling?

#

At this point I'm just guessing since this isn't code Stripe owns

velvet dragon
#

I tried all the tricks I could think of : using setFocus from react-hook-form to focus the errored input, calling the handleSubmit instead of trigger, window.setScroll etc... it just doesn't do ๐Ÿคท

#

In any case, it's not Stripe related if it's not a known issue on your side, I'll keep investigating, thanks for your help!

bronze timber
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

I hope you can get the behavior you are looking for ๐Ÿคž

velvet dragon
#

thanks ๐Ÿ™