Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable autofocus on first field in error #2653

Closed
lauterry opened this issue Apr 19, 2024 · 3 comments
Closed

Disable autofocus on first field in error #2653

lauterry opened this issue Apr 19, 2024 · 3 comments
Labels
Enhancement New feature or request Needs more info Further information is requested

Comments

@lauterry
Copy link

Is your feature request related to a problem? Please describe.
Hi there,

I've noticed that currently, when a field is left empty, it automatically gains focus.

However, I'd like to disable this behavior. The reason being, I've integrated Adyen inputs into another form alongside other inputs.

Describe the solution you'd like
Instead, I'd prefer if the page would scroll to the first empty input before the Adyen input.

@lauterry lauterry added the Enhancement New feature or request label Apr 19, 2024
@sponglord
Copy link
Contributor

@lauterry - I presume you're talking about the behaviour whereby you press "Pay", and the fields in the payment method are validated, and if one is in error then it gains focus?
Can you tell us which specific payment method you are seeing this in, and what version of AdyenWeb Dropin/Components your are using?

@sponglord sponglord added the Needs more info Further information is requested label Apr 22, 2024
@lauterry
Copy link
Author

Hello

Sorry for the delay.

I'm using "@adyen/adyen-web": "^5.64.0" and try to use a simple credit card payment method.

I added a picture. There is some others error on top and normally the scroll should go to the top errors. But because the adyen error filed gained focus, the scroll stop to the adyen form.

Capture d’écran 2024-05-30 à 14 21 01

Hope I have been clear

Best regrads

@m1aw
Copy link
Contributor

m1aw commented May 30, 2024

Would a solution where the error fields above get validated first.
If no validation / redirect logic is necessary for those fields, then check the credit card component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants