Makes sure we always resolve(call the callback) in feedback dialog.

Call the callback even when clicking outside the dialog, or escaping to close it.
pull/927/head
damencho 9 years ago
parent 06247266ad
commit eb2e709749
  1. 12
      modules/UI/feedback/FeedbackWindow.js

@ -176,6 +176,13 @@ export default class Dialog {
});
this.$el = this.window.$el;
AJS.dialog2(selector).on("hide", function() {
if (this.onCloseCallback) {
this.onCloseCallback();
this.onCloseCallback = null;
}
}.bind(this));
this.setState();
}
@ -201,11 +208,6 @@ export default class Dialog {
hide() {
this.window.hide();
if (this.onCloseCallback) {
this.onCloseCallback();
this.onCloseCallback = null;
}
}
onFeedbackSubmitted() {

Loading…
Cancel
Save