From 660fec0277df6cb457ed031cbc23acd1a9963bab Mon Sep 17 00:00:00 2001 From: MerlinGuillaume Date: Tue, 21 Feb 2023 09:19:04 +0000 Subject: [PATCH] [FIX] sale: do not focus on custom value in product configurator When the product configurator is opened, the focus is always on the custom value input, which may scroll down the configurator and make the user miss attributes Steps to reproduce: 1. Install Sales 2. Go to Settings > Sales > Product Catalog and enable Product Configurator and save 3. Go to Sales > Products > Products and open product 'Cabinet with Doors' 4. Go to the 'Attributes & Variants' tab and create and edit an attribute 'Custom' 5. Add a value 'Notes' and check 'Is custom value' and save 6. Add the value to the product and save 7. Open product 'Customizable Desk', in the 'Sales' tab, add 'Cabinet with Doors' to the Optional Products and save 8. Create a new quotation and add product 'Customizable Desk' 9. The product configurator opens up with the focus on the 'Custom' attribute input, if the window has a small height, it scrolls down to that input Solution: Remove the focus on the custom value input Problem: The focus was made on the input of custom values opw-3057390 closes odoo/odoo#113301 X-original-commit: dd3e5be00cc4e3408d90abb3923b6658fb1d3073 Signed-off-by: Victor Feyens (vfe) Signed-off-by: Guillaume Merlin (megu) --- addons/sale/static/src/js/variant_mixin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/sale/static/src/js/variant_mixin.js b/addons/sale/static/src/js/variant_mixin.js index 54477fb70b3..1e36633bd3c 100644 --- a/addons/sale/static/src/js/variant_mixin.js +++ b/addons/sale/static/src/js/variant_mixin.js @@ -151,7 +151,6 @@ var VariantMixin = { if (previousCustomValue) { $input.val(previousCustomValue); } - $input[0].focus(); } } else { $variantContainer.find('.variant_custom_value').remove();