#newb1
1 messages · Page 1 of 1 (latest)
This sounds very specific to your integration -- I'm not sure what you mean by multi-page form exactly, but you can control when the element is mounted in your code, based on appropriate events for your form system
multipage form is like tabs, first tab is, say, first and last name, hit next, next page is email and phone, hit next, etc.
technically it's all loaded simultaneously, the pages thing is just a flashy gui
like a one page website
Can you explain what you mean by focus not working?
Are you trying to force element focus with element.focus()?
https://stripe.com/docs/js/element/other_methods/focus
yes
won't work on a multipage form because it's blurred by design (not the first element)
*field
What would you expect to happen with focus for an element that is not visible?
exactly, that's why i need it to mount when its page is loaded, not when the form is loaded
but you're correct it's somewhat specific to the integration
just didn't know if there was already a "delay" code for mounting the element
you know, like below the fold, lazy load, etc
to this point, when it becomes visible it won't autofocus
I think you'll need to make sure you defer that focus call until after the element is mounted/visible