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.

Components are not loaded and shown properly when there are concurrent calls to NavigatorController.present()

See original GitHub issue

Short description of the problem:

When there are concurent calls to NavigatorControllers present() method, some of components don’t properly loaded and shown, e.g.:

nav.present(loading);
nav.present(toast);

It seems that the last call to present() prevents all the previous calls to present().

What behavior are you expecting?

Both of loading and toast components are loaded and shown properly and promises from present method resolve as they should do. After 1500ms loading component should be dismissed.

Steps to reproduce:

In all three cases expected behavior is the same and described in the section above.

Open plunker page for demos.

Case 1:

Click Start button

  • Move your mouse over the Start button and you will see, that there is a transparent overlay.
  • this.nav.present(loading) isn’t resolved

Case 2:

Open home.ts file and comment ‘Case 1’ code and uncomment Case 2 code. Click Start button.

  • Loading dialog is shown, but it won’t be removed after 1500 ms
  • this.nav.present(loading) isn’t resolved

Case 3:

Comment ‘Case 2’ code and uncomment Case 3 code. Click Start button.

  • Loading dialog isn’t shown
  • this.nav.present(loading) is resolved

Other information: I think #6209 can somehow be related to this issue, but I’m not sure. #7342

Which Ionic Version? 1.x or 2.x 2.x

Plunker that shows an example of your issue

http://plnkr.co/edit/jHg2QDBIPs5NRTTUdxL7?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.3.0 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 OS: (it was empty, but my OS is Win10) Node Version: v5.10.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jgw96commented, Jul 28, 2016

@likerRr Sorry for not being clear! You will be able to show a loading and toast component at the same time, but not multiple overlay components of the same type at the same time. Thanks!

0reactions
likerRrcommented, Jul 28, 2016

@jgw96 Hello, thanks for answering. Please, clarify, you mean that in beta.11 I won’t be able to show loading and toast components at the one moment? Even if I wait until one of them resolves?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to tell if UIViewController's view is visible - Stack Overflow
Invoking the view method causes the view to load (if it is not loaded) which is unnecessary and may be undesirable. It would...
Read more >
Showing and hiding view controllers - Apple Developer
Reusing the same view controller in multiple places creates a potential problem: presenting it in different ways based on the current context. For...
Read more >
Migrate to the Navigation component - Android Developers
Integrate the Navigation component - For each activity, build a navigation graph which contains the one or more fragments managed by that ...
Read more >
iOS: Root Controller Navigation - Medium
Using a single navigation stack to present or push the new View Controller with no interface to navigate back. This approach usually keeps...
Read more >
JavaScript - Bootstrap
Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a...
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