Open SergeyCherman opened 7 years ago
I wonder if it would make more sense to reject the close
and closed
promises in this case? The modal is being closed by an external force (the location change), it feels more like a "cancel" than a successful closing of the modal to me.
I can see it both ways, however it's possible users of the service have one function for ok/cancel which then uses the function input to decide what to do. In this case if a user has any cleanup logic on modal close it wouldn't run.
Currently reject doesn't fire unless the service isn't being used correct, so it would be a change for service users as they probably don't have logic for the reject case.
I think when closing the modal on location change it shouldn't pass event as the result .