Wrong value appears whennumerous clicks are performed on "Plus" button

Started by NorrNext, February 18, 2025, 12:39:03 PM

Previous topic - Next topic

NorrNext

I noticed one unpleasant issue on the checkout.
Joomla 5, VM 4, customized Cassiopeia template.
I added an item and proceed to the checkout. then I decided quickly to increase amount of an item from 1 to 10 and make quick multiple clicks on «Plus» icon.  And... I see there is a bug. The number increases: 1,2,3,4 and then the number returns back to 3 after a quick click. then I continue to click on plus and it's again 4,5,6 and etc.
So, when I perform quick clicking on «plus» icon, sometimes the value decreases instead of increasing.



VirtueMart 4.4.4 11101, Joomla 5.2.3
NorrNext - payment plugins and ecommerce solutions for Joomla components - https://norrnext.com
Stripe for VirtueMart - https://extensions.virtuemart.net/checkout/payments/stripe-virtuemart-detail
Stripe Checkout for VirtueMart - https://extensions.virtuemart.net/checkout/payments/stripe-checkout-virtuemart-detail

Ghost

It takes time for AJAX request to complete. One option is to disable the button until it completes. Another is to add a delay between the click and the request.