From 3bf7956ce00fd60f8bfa84c47b67fa2f52bcff6f Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 13 Aug 2019 23:28:36 +0000 Subject: Fix jQuery.fn.attr('selected') might use property instead of attribute (#31894, #31196). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18365 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'public/javascripts') diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 019b45dc4..b6658c71c 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -177,7 +177,7 @@ function buildFilterRow(field, operator, values) { select = tr.find('td.operator select'); for (i = 0; i < operators.length; i++) { var option = $('').attr('label', filterValue[2]);} @@ -206,7 +206,7 @@ function buildFilterRow(field, operator, values) { } } else { option.val(filterValue).text(filterValue); - if ($.inArray(filterValue, values) > -1) {option.attr('selected', true);} + if ($.inArray(filterValue, values) > -1) {option.prop('selected', true);} } select.append(option); } @@ -240,7 +240,7 @@ function buildFilterRow(field, operator, values) { var filterValue = filterValues[i]; var option = $('