From 0ff9b82ee6e845b48adb5b065c38ffd13bf904ee Mon Sep 17 00:00:00 2001 From: "Walid HANNICHE (waha)" Date: Wed, 24 Aug 2022 12:14:38 +0000 Subject: [PATCH] [FIX] website_sale: add to cart (image too large) Steps to reproduce: 1- enable "add to cart" feature on the website shop page 2- add any product to the cart 3- the image is way too large Bug: the animation creates a clone of the original image on which new css classes has been added (h-100 w-100) that sets the image to full size Fix: since the CSS atribute of the new image are set in the function removing all the classes of the original image solves the issue Note: the bug only started on 15.2 where the new classes have been added merging on 15.0 just to prevent future issues opw-2952608 closes odoo/odoo#99184 X-original-commit: 90911266403cd6157f61e8123b24dcdf3ecd98f4 Signed-off-by: William Braeckman (wbr) --- addons/website_sale/static/src/js/website_sale_utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_sale/static/src/js/website_sale_utils.js b/addons/website_sale/static/src/js/website_sale_utils.js index 7112122b549..e942d9e88de 100644 --- a/addons/website_sale/static/src/js/website_sale_utils.js +++ b/addons/website_sale/static/src/js/website_sale_utils.js @@ -64,6 +64,7 @@ function animateClone($cart, $elem, offsetTop, offsetLeft) { top: $imgtodrag.offset().top, left: $imgtodrag.offset().left }) + .removeClass() .addClass('o_website_sale_animate') .appendTo(document.body) .css({