Ionic modal unnecessarily calls on removal


I’m having a slide box kind of widget, where every slide “ng includes” a separate template. Every template comes with its own controller and some controllers initialize Ionic modals.

When a slide is far enough out of view, I unload/remove it. This leads to destruction of the scope of that particular controller, where I’m removing the corresponding Ionic modals.

Upon removal of an Ionic modal the method ionicModal#hide is called (Even though no modal is visible). It shows the click-block div for a short amount of time by calling $;.

This breaks the responsiveness of the slide box for a short amount of time, because it can’t receive any touch or mousedown events.

Why is the click-block div shown in the first place? And shouldn’t this be skipped altogether, since the modal is not visible in the first place?