From 8d9df785be63d56e84eaeaea6505f27717742a69 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Thu, 18 Dec 2014 23:05:10 +0000 Subject: [PATCH] Prevent error when closing modal dialog No Issue - Moved sendAction outside of the event handler as calling it from inside was generating an error in the console. --- core/client/components/gh-modal-dialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/client/components/gh-modal-dialog.js b/core/client/components/gh-modal-dialog.js index 96c5805026..04cc4860ec 100644 --- a/core/client/components/gh-modal-dialog.js +++ b/core/client/components/gh-modal-dialog.js @@ -13,9 +13,10 @@ var ModalDialog = Ember.Component.extend({ this.$('.js-modal-background').on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', function (event) { if (event.originalEvent.animationName === 'fade-out') { self.$('.js-modal, .js-modal-background').removeClass('open'); - self.sendAction(); } }); + + this.sendAction(); }, confirmaccept: 'confirmAccept',