Ionic page removed automatically when it is to fast

I have a new app that has one page that handles a user workout, it launches 2 different modals one for rest, and one for displaying current exercise.

In general the base page, shouldn’t be viewable it only manages the workout phases, but when I launch modals without interaction it fails.

see no interaction here: (click start workout, and finished it, do it twice and then black screen…)

see with interaction, all is good:

Would you be able to simulate this in a basic demo repo? This could be an issue, but without seeing the code, it’s hard to tell.

Yes of course, as you can see I added links that show the error.
Here is a link to the compiled codes:

I’ll create tomorrow another repo with pre compiled code that does the same.

Yeah I can’t do much with the compiled code, so I’ll need to see some raw stuff

Big thanks @mhartington for your help.

Here is a project that does the same as I tried:

simply clone, npm install, and ionic serve

even though you know that much better than me :innocent:

So I’m looking at the project, I run serve I get the first screen, click the button, go to modal management state, it shows a modal twice, fires an alert, closes the modal and then I’m on the management state. What should I be seeing?

Now do the same, but change the:

This.withDelay = false;

In this file:

This will keep modals open without timeout

Ahh ok, this makes sense. You’re trying to show/hide pages at the same time, not really recommended. At some point the page exist at the same time without the delay, then what gets what done to it? Race condition…

I’d probably look at trying rethink the UI for this.

Thanks, how would you handle my kind of situation? Or I should changed the whole UX?

Do they need to be modals? Why not just regular pages?

The only reason I use modals, is because I have a JavaScript object in the main page that contains an array of the pages to go through one by one.

But even if I use pages, in the same manner of exiting and entering a view with no delay, the would still be the same race condition no?

Hey @mhartington sorry for nagging again, but just wanted hear what you say about my last message.


well anybody else has an idea?

I changed it to pages instead of modals and still same error…