Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Prevent cart form submission while ajax running #438

Merged
merged 1 commit into from
Jun 17, 2015
Merged

Conversation

cshold
Copy link
Contributor

@cshold cshold commented Jun 17, 2015

Issue: With a single product in the cart, changing the quantity to 0 and then hitting enter tries to submit the form (not ajax), while the blur event on the quantity input removes the product from the cart. It's a race to see which happens first, but most of the time the form gives an ugly JS alert saying it can't submit an empty cart.

Fix: This PR stops the cart submission if the ajax quantity is currently running.

cc/ @stevebosworth (same update as Brooklyn)

@stevebosworth
Copy link
Contributor

👍

cshold added a commit that referenced this pull request Jun 17, 2015
Prevent cart form submission while ajax running
@cshold cshold merged commit f9a7dc0 into master Jun 17, 2015
@cshold cshold deleted the ajax-submitting branch June 17, 2015 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants