Hi all,
I’m implementing a method to close a modal, but I’m using drag events, swipe-right… so, close modal in overlow has a different behavior. So, I believe I can change in ionic.bundle.js
` return $timeout(function() {
if (!self._isShown) return;
//After animating in, allow hide on backdrop click
self.$el.on(‘click’, function(e) {
if (self.backdropClickToClose && e.target === self.el && stack.isHighest(self)) {
self.hide();
}
});
}, 400);
},
`
to
` return $timeout(function() {
if (!self._isShown) return;
//After animating in, allow hide on backdrop click
self.$el.on(‘click’, function(e) {
if (self.backdropClickToClose && e.target === self.el && stack.isHighest(self)) {
if(self.modalEl && self.modalEl.firstElementChild && self.modalEl.firstElementChild.onclose){
self.scope.$emit('needclosemodal');
} else {
self.hide();
}
}
});
}, 400);
}, `
and now I’m listen this event in my service/controller and dispatch my close behavior.
But i dont like this way, has some other method i can implement? Is this a good idea and i can contribute this on ionic project?