ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Opening Modal randomly causes App to freez

Open romanrast opened this issue 12 years ago • 48 comments

Type: bug

Platform: ios 7 webview

It's hard to reproduce the bug since it happens randomly. But it seems to come with ionic beta10.

romanrast avatar Aug 02 '14 08:08 romanrast

i have same issue

asterism612 avatar Aug 02 '14 09:08 asterism612

I'm having the same issue. It was happening with beta 9 as well.

erinc avatar Aug 02 '14 22:08 erinc

Do you mind testing this against the nightly builds and providing a codepen for this?

mhartington avatar Aug 05 '14 20:08 mhartington

not freeze.

i guess all event prevent.

when freezing page i got it ionicPopup Push Notification message.

message button is work fine

asterism612 avatar Aug 06 '14 01:08 asterism612

Alright. Can you still provide a codepen example of this?

mhartington avatar Aug 06 '14 14:08 mhartington

I can't provide a codepen at the moment, but this is very hard to reproduce. It happens very randomly, with no error messages. I have a collection repeat with each item opening in a modal. One thing to note is that I was doing an $http request to fetch some further details from the server after a list item is clicked. Once I stopped doing that, I haven't seen the modal freezing again. So this might be related to: https://github.com/driftyco/ionic/issues/1914

erinc avatar Aug 06 '14 16:08 erinc

I've seen this issue a number of times myself. Very hard to reproduce, but one very non-scientific observation is that I've only seen it when testing via ionic serve, viewing in Safari. Never in Chrome.

mbuster avatar Aug 06 '14 20:08 mbuster

Hmm, could it be related to ionic serve?

On Wednesday, August 6, 2014, Mark Buster [email protected] wrote:

I've seen this issue a number of times myself. Very hard to reproduce, but one very non-scientific observation is that I've only seen it when testing via ionic serve, viewing in Safari. Never in Chrome.

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/1912#issuecomment-51389654.

mhartington avatar Aug 06 '14 20:08 mhartington

I've seen this on both iOS emulator and the iPhone 4s.

erinc avatar Aug 06 '14 20:08 erinc

Hmm, okay @perrygovier will look into this a bit more

mhartington avatar Aug 07 '14 13:08 mhartington

I just saw the issue again when running on the device. By chance, I discovered that if I remove the modal-open class from the body element when in this state, the app will become responsive again. It seems like something related to the modal-open class is preventing touch interaction in some cases.

mbuster avatar Aug 08 '14 19:08 mbuster

Same issue.

After some tests, I found that: When you changed state, usually go to another view, and open a modal, it will freeze. When you changed state, usually go to another view, and open a modal, refresh, got a blank page. However, if you refresh the page after changed state, everything is Ok, modal works well. So , is this issue cause by UI-Router or history?

ionic serve, python -m SimpleHTTPServer get same result. Issue only happens on iOS safari.(I have PC, android phone iPad at hand.)

centimitr avatar Aug 10 '14 05:08 centimitr

I believe this issue is related to that posted here: http://forum.ionicframework.com/t/modal-not-receiving-touch-events/8025

And here: http://forum.ionicframework.com/t/ionicloading-bug/8001

mbuster avatar Aug 11 '14 12:08 mbuster

I'm having the same issue in 1.0.0-beta.11 as well

kcdipesh avatar Aug 18 '14 11:08 kcdipesh

I believe it's a race condition, similar to https://github.com/driftyco/ionic/commit/25ee658e8b271d1e023ab93300f65cca790d291c Will investigate

perrygovier avatar Aug 23 '14 00:08 perrygovier

On mobile devices (mainly tested on iPhone 5 / iOS 7) modals are working if we go back to beta.9. beta.10 and beta.11 randomly work on desktop browser or emulator but on mobile devices the modals cause our app to freeze in all cases. No significant findings, I know, but perhaps you can identify some faulty changes ... ;)

stefanmdt avatar Aug 25 '14 09:08 stefanmdt

I also had the same issue when I updated my Ionic to beta.11 (previously I was using beta.6 and it wasn't happening).

However, I found that this solution worked for me: http://forum.ionicframework.com/t/modal-not-receiving-touch-events/8025/4

So it seems that this issue is related to ionic loading and the loading-active class on the body element.

harsain avatar Aug 28 '14 01:08 harsain

Yes! Solved problem in our case because we planned to kick the ionic loading anyway. Thanks a lot!

stefanmdt avatar Aug 28 '14 05:08 stefanmdt

I have seen this issue as well. After launching a modal, our users are unable to click any of the buttons on the modal. The app doesn't freeze, but the buttons don't respond. It is extremely hard to reproduce.

I've seen this with two separate modals, both in the browser and on actual hardware devices iPhones and Androids.

My app is currently running beta10.

It looks like I should try upgrading to beta11 and using the workaround from http://forum.ionicframework.com/t/modal-not-receiving-touch-events/8025/2 - will give that a try.

shedd avatar Aug 30 '14 21:08 shedd

I think I know how to fix this, but I'm having trouble recreating the problem to test against. Can someone create a codepen or something that reproduces this? Is it just a specific device? Also, a fix for the loading service may have fixed this already. Could you try a nightly build too?

perrygovier avatar Sep 08 '14 21:09 perrygovier