Hi
sometimes (when you switch states really fast) , the ionic loading.hide is not removing the
"loader-active" class from body element which makes modals buttons not useable
took me a long time to figure it out , this is my code
so the loading is gone also the backdrop but the body keeps the class 'loader-active’
its not happen everytime , but if you walk through the application its happen once in a while
( i think the state.go just break the hide at the middle , if i pause the execution with the debugger then the problem not happening - i guess it had enough time to finish the removal of class)
if any1 have a problem with modal not being clickable check if you have the loader-active class on body tag
until the ionic team will fix it here is a quick fix :
I have exactly the same problem using the $ionicLoading for indicating request activity inside an interceptor.
At first sight it was random, but inspecting the DOM inside the debugger showed that <body class="loading-active"… was always present. Using buttons and navigating is still working, but as soon as you call $ionicModal the modal is not usable any more and there is no way to escape.
using also beta.11, but problem exists also in beta.10
hopefully this will be fixed soon, @rs324 thank you for the workaround
If I use $ionicLoading it adds div class “loading-container” to the DOM which contains div class loading. This is not removed from the DOM upon hide and will sit there throughout the lifetime of the app - I’m assuming this is a bug and not expected behavior…
Same issue on beta.11. Quick fix from @rs324 is works, but I need add some timeout on different device. It’s not a safe solution beacuse I dont know users device performance. Hopefully it will be fixed soon.
I still experience this with ionic v1.0.0 final, with loadingOptions.delay set to 100ms.
If I don’t set a delay, this doesn’t seem to occur any more, so I tend to think this might be a race condition, e.g. calling $ionicLoading.hide() shortly before the delay expires.
This is a wild guess, anyway, since this issue seems to occur randomly, and is hard to reproduce.
I also noted that the workarounds given here do not work in my case, using ionic v1.0.0.
It seems that after calling $ionicLoading.hide(), the ‘loading-active’ actually is removed from body.
However, some time (couple of milliseconds, apparently) later, the class is added to the body element again, without any application code executing inbetween (at least to my knowledge and debug abilities).