#Mike Taylor - Disable Autofocus

1 messages · Page 1 of 1 (latest)

jovial path
#

I am going to assume you are talking about elements loaded by Stripe.js. Is that correct?

fresh grove
#

yes correct

#

We are seeing the focus shift within a form to the Stripe element. And looking to override that refocus.

jovial path
#

So when a user enters a completed card number but that number is incorrect?

#

for example

fresh grove
#

yes or even just a incompete card number

jovial path
#

You could use this approach to force the user back to the incorrectly entered field (I think).

fresh grove
#

We are looking to "turn off" the card element event based focus behaviour. Is the parameter in the CardElement options to do this?

jovial path
#

I do not think this is something you can deactivate using the options object at the time of element creation. I suspect your best bet would. be to experiment with the different events to see which fires when you want to prevent the focus shift and re-focus back on the offending input