Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you have an autocomplete field on a checkout page selecting an option breaks the continue button because the throbber keeps spinning.
Putting a return in Drupal.behaviors.commerceCheckout
resolves the issue for the moment but is not a solution. Needs more investigating...
Comment | File | Size | Author |
---|---|---|---|
#1 | snapshot3.jpg | 17.47 KB | Jax |
Comments
Comment #1
Jax CreditAttribution: Jax commentedComment #2
arzuga CreditAttribution: arzuga commentedup
Comment #3
rszrama CreditAttribution: rszrama commentedI don't really see this as an issue with our code, though I could be wrong. Our code solely looks for a click on the button, and for some reason pressing enter in the autocomplete dropdown is triggering this click event. The only relevant code in misc/autocomplete.js appears to be Drupal.jsAC.prototype.onkeyup, but I don't know why it is triggering a click event on the continue button.
Confirming the issue, just not sure the fix should be in Commerce vs. Drupal itself.
Comment #4
arzuga CreditAttribution: arzuga commentedok rszarama,
in my case I think the problem is with Commerce Registration
I've another issue here https://www.drupal.org/node/2402949
the entity registration form has an autocomplete field, it's not working in the checkout pane.
I can "solve" the problem, in may way, comping the script in the head of the page that work and pasting it in
a markup filed in the form.
Comment #5
rszrama CreditAttribution: rszrama commentedI was able to reproduce it by adding a product reference field with an autocomplete widget to the billing customer profile type. So it's not just Commerce Registration but definitely something in the autocomplete.js behavior clicking that continue button.
Comment #6
arzuga CreditAttribution: arzuga commenteduhm,
so it's a Drupal core issue?
I'm not a coder. I just want to create an issue in the right place, just to find someone who can solve it.
thanks a lot and sorry for my english
Comment #7
rszrama CreditAttribution: rszrama commentedI'm saying it may be a core issue, but I'm happy for this to remain open here until someone can find out for sure.
Comment #8
vasikeisn't this a duplicate of #1931180: Checkout.js disables continue conflicts with autocomplete?
and part of #2598918: Prevent checkout form submission when "Enter" is pressed on checkout text inputs?