From e015ee5df34fbb7d3861b1dd158fe4197f17f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 21 May 2019 08:44:46 +0000 Subject: [PATCH] [FIX] website_sale: fix infinite recursion from product configurator When the configurator modal is shown on the shop page (when the add to cart button customize show is enabled), changing the quantity would trigger an infinite recursion before this commit, because the selector was not finding the input on the page (because it is not there), but it was not restrictive enough so it matched the input on the modal itself. PR: #32691 --- addons/website_sale/static/src/js/website_sale_options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/static/src/js/website_sale_options.js b/addons/website_sale/static/src/js/website_sale_options.js index ab3542589af..c0adc909bce 100644 --- a/addons/website_sale/static/src/js/website_sale_options.js +++ b/addons/website_sale/static/src/js/website_sale_options.js @@ -131,7 +131,7 @@ sAnimations.registry.WebsiteSaleOptions = sAnimations.Class.extend(ProductConfig */ _onOptionsUpdateQuantity: function (quantity) { this.$form - .find('input[name="add_qty"]') + .find('.js_main_product input[name="add_qty"]') .first() .val(quantity) .trigger('change');