From e7ef71f32e00fecc1dbae51b4f0c2162b4036ea8 Mon Sep 17 00:00:00 2001 From: Guillaume Lafarge Date: Mon, 9 Dec 2013 17:17:48 +0100 Subject: [PATCH] [-] FO : Fix versatile jQuery selector `:hidden` selects form elements with `type="hidden"` but also : elements with `display:none`, elements with their width/height equal to zero and which the ancestor element is hidden. `input[type=hidden]` is more appropriate for those reasons. --- themes/default-bootstrap/js/product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default-bootstrap/js/product.js b/themes/default-bootstrap/js/product.js index 726f55127..4d4628cc5 100644 --- a/themes/default-bootstrap/js/product.js +++ b/themes/default-bootstrap/js/product.js @@ -730,7 +730,7 @@ function checkUrl() $('#color_' + attributesCombinations[a]['id_attribute']).addClass('selected'); $('#color_' + attributesCombinations[a]['id_attribute']).parent().addClass('selected'); $('input:radio[value=' + attributesCombinations[a]['id_attribute'] + ']').attr('checked', true); - $('input:hidden[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); + $('input[type=hidden][name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); $('select[name=group_' + attributesCombinations[a]['id_attribute_group'] + ']').val(attributesCombinations[a]['id_attribute']); } // find combination