Modal no longer opening after upgrade from 0.9.20 -> 0.9.22

All of my modals seemed to have stopped working after an upgrade from .19 -> .22. I had a look at the docs and didn’t notice any interface changes. No errors in my logs/console etc. I looked through recent ionic commits but nothing has changed in ionicModal in the last 3 weeks.

The modal is attached to the DOM properly and all the rules/computed styles seem to be correct. The modal has the proper height, width, position, opacity etc. but simply isn’t visible on the screen. Tried playing with the z-index but that doesn’t seem to be the problem.

One thing I am noticing that is a little odd is that each time I return to a ui-router state with a controller that instantiates a modal, a new modal is create and attached to the dom. So after navigating to a specific page 3 times, I’ll have three instances of my modal on the DOM. Wondering if I should have some clean-up code somewhere to take care of this or if this was intended to be managed by the ionic framework.


You should try to use $ionicModal instead of Modal

.controller('ModalCtrl', function($scope, $ionicModal) {

Thanks for the response dexlo. The change to ionic modal that you’re referring to was one of the changes I mentioned that happened 3 weeks ago. We made that change around that time and have been using $ionicModal since.

After some git bisect-ing I’ve determined that our upgrade to 0.9.22 was definitely the change that broke our app. We skipped 0.9.21 in the upgrade so I decided to give that version a try and I verified that our app does work properly with 0.9.21.

EDIT: Unfortunately, ng-click seems to suffer from some issues in 0.9.21 so that isn’t an option for us right now either.

Sorry about the hiccup with 0.9.22 @gavares. We are aware and working on improvements.

@ben, not a problem. Let me know if there is any information I can provide or if I can help in any way.

Is this just in a desktop browser, or any specific versions of Android or iOS?

@adam yes it work well on my Android phone 4.2 :slight_smile:

I’ve tested on the iOS emulator and an iOS7 device. Later today I’ll have access to an Android device and I can test on that as well.

0.9.22-alpha here. In iOS and Chrome my modals are working fine.

Working for me on 0.9.23 in Android 4.4 and iOS7. Sorry about this trouble.

@gavares could you try with release 0.9.23?

And if it still doesn’t work for you, could you try a codepen to show us what use-case is messing it up?

Actually, @gavares, would you be able to try the nightly build? (sorry to throw so many versions at you). I recently made another fix to the tap/click:

Just got around to testing 0.9.23 and my modals are working. We’ll stick with 23 for now. Thanks @adam and @andytjoslin