From: Coleman Watts Date: Mon, 9 Jun 2014 15:58:57 +0000 (+0100) Subject: CRM-14353 - More accurate comparison with multiselects and excluding buttons X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bf7a4fbcb12e0364d43ede5aa106952dae3c630b;p=civicrm-core.git CRM-14353 - More accurate comparison with multiselects and excluding buttons --- 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; } });