question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Ionic5.01, Android 6~8, modalController works strange when two modals open togather.

See original GitHub issue

I test it in emulator, android 6,7,8, all of them reproduce the following issues. These issues doesn’t exist in ionic 4.4.

Steps:

  1. create modal A, present it.
let modal = await this.modalCtl.create({
component: modalAClass
....
});
modal.present();
  1. in modal A, create modal B.
let modal = await this.modalCtl.create({
component: modalBClass
....
});
modal.present();
  1. in modal B, dismiss itself.
this.modalCtl.dismiss();
  1. then you will see, both modal A and B are dismissed in the UI.
  2. and the page below can’t be interactive anymore.
  3. inspect DOM in devTools, you will see modal A is still there. And more strange is, you call interact with the buttons in modal A, although you can’t see it.

To find more, I try another test. Steps:

  1. create modal A, present it.
let modal = await this.modalCtl.create({
component: modalAClass
....
});
modal.present();
  1. in modal A, close A, and then create modal B.
this.modalCtl.getTop().dismiss();
let modal = await this.modalCtl.create({
component: modalBClass
....
});
modal.present();
  1. then you will see, both modal A and B are dismissed in the UI
  2. and the page below can’t be interactive anymore.
  3. inspect DOM in devTools, you will see modal B is still there. And as above, you call interact with the buttons in modal B, although you can’t see it.
  4. Workaround: add await before modalA dismiss, modal B will works. But, you will wait until modal A close before modalB popup, which is not a good UI expirence.

Envirorment: Ionic: Ionic CLI : 6.1.0 Ionic Framework : @ionic/angular 5.0.1 @angular-devkit/build-angular : 0.900.3 @angular-devkit/schematics : 9.0.3 @angular/cli : 9.0.3 @ionic/angular-toolkit : 2.1.2

Capacitor: Capacitor CLI : 1.5.0 @capacitor/core : 1.5.0

QQ20200225-193247@2x

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:28 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
liamdebeasicommented, Apr 1, 2020

Can everyone try the following dev build and let me know if it resolves the issue?

Ionic Angular npm i @ionic/angular@5.1.0-dev.202004011618.3123a31

Ionic React npm i @ionic/react@5.1.0-dev.202004011618.3123a31

1reaction
liamdebeasicommented, Apr 3, 2020

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic/pull/20940 and will be available in an upcoming release of Ionic Framework.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: Ionic5.01, Android 6~8, modalController works ...
I test it in emulator, android 6,7,8, all of them reproduce the following issues. These issues doesn't exist in ionic 4.4. Steps: create...
Read more >
ion-modal
ion-modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about custom...
Read more >
Ionic Modal On Dismiss Bug
It only fires when is a mobile and the modal is full screen. Does somebody know why this happens and how to solve...
Read more >
How to Navigate in Ionic Modals with ion-nav - Ionic Blog
Let's build an app with navigation inside of a modal and make everything work, including the Android back button as well!
Read more >
Videoder apk direct for pc
hs 1/1.6 1/2+3 10 greatest empiress 100 factorial 100 million crore 1000 ... ef core add modal.open class to body add mongodb path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found