0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

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.
This commit is contained in:
Jason Williams 2014-12-18 23:05:10 +00:00
parent 8714822d48
commit 8d9df785be

View file

@ -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',