VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: NorrNext on February 18, 2025, 12:39:03 PM

Title: Wrong value appears whennumerous clicks are performed on "Plus" button
Post by: NorrNext on February 18, 2025, 12:39:03 PM
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.

(https://i.postimg.cc/Y9KLBZ37/2025-02-18-14-37-37.png) (https://postimg.cc/67cpdHgb)

VirtueMart 4.4.4 11101, Joomla 5.2.3
Title: Re: Wrong value appears whennumerous clicks are performed on "Plus" button
Post by: Ghost on February 20, 2025, 07:34:38 AM
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.