From: Coleman Watts Date: Mon, 9 Jun 2014 13:51:00 +0000 (+0100) Subject: CRM-14690 - Target correct button for undo action X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e7f1d2176eecde2e561bdfa99b168e27857e2e01;p=civicrm-core.git CRM-14690 - Target correct button for undo action --- diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 2968acb308..0fd7f4b303 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -355,7 +355,7 @@ } if (widget.data('uiDialog')) { // This is a bit harsh but we are removing jQuery UI's event handler from the close button and adding our own - $('.ui-dialog-titlebar-close').first().off().click(cancelAction); + widget.parent().find('.ui-dialog-titlebar-close').first().off().click(cancelAction); } widget.on('crmFormLoad.crmForm', function(event, data) {