From bf7a4fbcb12e0364d43ede5aa106952dae3c630b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 9 Jun 2014 16:58:57 +0100 Subject: [PATCH] CRM-14353 - More accurate comparison with multiselects and excluding buttons --- js/Common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/Common.js b/js/Common.js index 44736662ea..7918a9596d 100644 --- a/js/Common.js +++ b/js/Common.js @@ -245,10 +245,10 @@ CRM.validate = CRM.validate || { */ CRM.utils.initialValueChanged = function(el) { var isDirty = false; - $(':input:visible, :input.select2-offscreen', el).each(function () { + $(':input:visible, :input.select2-offscreen', el).not('[type=submit], [type=button], .crm-action-menu').each(function () { var initialValue = $(this).data('crm-initial-value'); // skip change of value for submit buttons - if (initialValue !== undefined && !$(this).hasClass('form-submit') && initialValue != $(this).val()) { + if (initialValue !== undefined && !_.isEqual(initialValue, $(this).val())) { isDirty = true; } }); -- 2.25.1