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...

CommentFileSizeAuthor
#1 snapshot3.jpg17.47 KBJax
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jax’s picture

FileSize
17.47 KB
arzuga’s picture

up

rszrama’s picture

Title: Having an autocomplete field on a checkout pane breaks the continue button when selecting with the enter key » Figure out why the core autocomplete onkeyup behavior clicks the checkout continue button
Version: 7.x-1.9 » 7.x-1.x-dev
Category: Bug report » Task

I 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.

arzuga’s picture

ok 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.

rszrama’s picture

I 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.

arzuga’s picture

uhm,
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

rszrama’s picture

I'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.

vasike’s picture