[Web] Focus Loop in PaymentElement
Causes Input Fields to Lose Focus Repeatedly.
#2021
Labels
needs triage
Needs triage
Describe the bug
When using the
PaymentElement
widget from theflutter_stripe_web
package, input fields lose focus instantly after being selected. This issue is observed primarily in Chrome browsers, where theFocus
state toggles repeatedly, making the input fields unusable.To Reproduce
Steps to reproduce the behavior:
PaymentElement
widget with the following parameters:flutter run -d chrome
Screen.Recording.2024-12-23.at.23.26.29.mov
Expected behavior
Input fields in the
PaymentElement
widget should retain focus when selected, allowing users to enter their details seamlessly.Smartphone / tablet
Additional context
upon tweaking
onFocusChange
to printfocus
as follow :and upon uncommenting the commented :
the loop happens.
FocusNode
and the underlyingiframe
behavior of the Stripe Payment Element.The text was updated successfully, but these errors were encountered: