Bug 29330 - Same Page OnDisappearing code triggered differently between android and ios project
Summary: Same Page OnDisappearing code triggered differently between android and ios p...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Windows
: Low normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-04-22 23:45 UTC by glucose1e
Modified: 2017-11-25 22:53 UTC (History)
8 users (show)

Tags: ac, page, lifecycle, norepro
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 29330 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description glucose1e 2015-04-22 23:45:32 UTC
Repro Steps:
1. MainPage is a NavigationPage, then Navigation.PushAsync to a CarouselPage
2. In the CarouselPage, there are 3 sub pages. We write "public override void OnDisappearing" in the second page...Since the OnDisappearing has bug in CarouselPage itself in Android. So we use a workaround here, code in the second page. Shrug...
3. Then in the CarouselPage, in the first page, we Navigation.PushModelAsync to a ContentPage.

Current result:
After Step 3, the second page's OnDisappearing is triggered in IOS 8.1, but there is no trigger in Android 4.2.

Expect result:
After Step 3, the OnDisappearing should be triggered as same behavior in android and IOS. And since the second page is not show yet, we navigate in the first page, there should be no trigger.
And if we PopAsync the whole CarouselPage, the OnDisappearing in second page should also be triggered.

We don't know if the expect result is correct, but we thought Xamarin Forms should have the same event behavior in different platforms. Otherwise, the situation need to be handled by app developer. And if the developer do not know the behavior is different, We would like to say, this is a trap for every developer. Anyone could fall in the trap, that's a bad experience.
Comment 1 Namyslaw Szymaniuk 2017-06-30 11:57:21 UTC
I've found this issue at the beggining of my XF experience (like a year ago), and seems, that it still exist, that XF team has nothing to add - it's "CONFIRMED" from *2015-04-22* :D.
Great bug fixing guys...
Comment 2 adrianknight89 2017-11-25 22:53:37 UTC
This is possibly related to 27798. Right now, you could ignore appearing/disappearing events with a platform specific.