From: Coleman Watts Date: Wed, 5 Feb 2014 00:57:01 +0000 (-0800) Subject: CRM-14170 - BugFix for closing help dialog when clicked rapidly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=55a93b02f1cabe335d740e8f117f0d5fd12c3cd9;p=civicrm-core.git CRM-14170 - BugFix for closing help dialog when clicked rapidly --- diff --git a/js/Common.js b/js/Common.js index 552ff5af56..dd5498f557 100644 --- a/js/Common.js +++ b/js/Common.js @@ -429,12 +429,13 @@ CRM.validate = CRM.validate || { var helpDisplay, helpPrevious; CRM.help = function (title, params, url) { - if (helpDisplay && helpDisplay.isOpen) { - helpDisplay.close(); + if (helpDisplay && helpDisplay.close) { // If the same link is clicked twice, just close the display - todo use underscore method for this comparison - if (helpPrevious === JSON.stringify(params)) { + if (helpDisplay.isOpen && helpPrevious === JSON.stringify(params)) { + helpDisplay.close(); return; } + helpDisplay.close(); } helpPrevious = JSON.stringify(params); params.class_name = 'CRM_Core_Page_Inline_Help';