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

Loading dismissOnPageChange triggered by Toast

Open n00b42 opened this issue 10 years ago • 4 comments

Short description of the problem:

A Loading with "dismissOnPageChange" set is dismissed if a Toast is shown/vanishs.

What behavior are you expecting?

As I dont think a Toast should be considered a "page change" I would expect the Loading to stay visible until I dismiss it on my own OR actually change the "current" page..

Ionic info

Cordova CLI: 6.3.1 Ionic Framework Version: 2.0.0-rc.1 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 OS: Windows 10 Node Version: v6.7.0

n00b42 avatar Oct 16 '16 20:10 n00b42

This issue also happens for Loading + Loading combinations. L1 has dismissOnPageChange = true L1 and L2 are shown, if L2 is dismissed, L1 will be dismissed also. for some reason, even if you dismiss L1 first, L2 will also be dismissed.

let 11 = this.lc.create({content:"Loading 1", dismissOnPageChange: true});
l1.present().then(()=> {
  let 12 = this.lc.create({content:"Loading 2"});
  l2.present().then(()=> {
    l1.dismiss();  //regardless of l1.dismiss or l2.dismiss
  });
});

if dismissOnPageChange is not specified, whatever was not dismissed remains. (e.g l1.dimiss(), l2 will remain). I expect that dismissOnPageChange should only happen on actual page changes. Kindly advise. Thanks

Note though that only tested this in Ionic 2 RC0.

Tiuser4567 avatar Oct 20 '16 13:10 Tiuser4567

I am seeing a similar problem with Toast + Toast combinations. If dismissOnPageChange is set to true and a toast message is created while another toast message is still visible the first toast message is removed, the new toast message appears very briefly before it too is removed no matter how long the duration is set to. If dismissOnPageChange is set to false the second toast message replaces the first, but it does remain on the screen for the correct duration.

This is with using Ionic 2 RC2. I wonder if pull request #9034 tries to resolve this.

arcaileus avatar Nov 08 '16 19:11 arcaileus

This should be fixed by https://github.com/driftyco/ionic/pull/9747. If you are still having the issue using the latest (2.0.0-rc.6) please let me know and I will reopen. Thanks!

brandyscarney avatar Jan 25 '17 00:01 brandyscarney

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 04 '18 12:09 ionitron-bot[bot]