Description
The ContentPage's OnBackuButtonPressed method is not invoked on iOS and MacCatalyst.
Seems to work on other Platforms (only tested Android in the simulator).
Steps to Reproduce
- Create new MauiApp
- Add a second Page
- Replace AppShell call with
MainPage = new NavigationPage(new MainPage());
- Add a button and add code to navigate to the second Page
async void NavigateButton_Clicked(System.Object sender, System.EventArgs e) { await this.Navigation.PushAsync(new NewPage1()); }
- On the second page, override OnBackButtonPressed():
protected override bool OnBackButtonPressed() { return base.OnBackButtonPressed(); }
- Set a breakpoint
- Debug the app, go to the second page, hit the back button - should break in there, but doesn't
Version with bug
6.0.312
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS15, MacOS 12.4
Did you find any workaround?
not yet, will update once I found one...
Relevant log output
Description
The ContentPage's OnBackuButtonPressed method is not invoked on iOS and MacCatalyst.
Seems to work on other Platforms (only tested Android in the simulator).
Steps to Reproduce
MainPage = new NavigationPage(new MainPage());async void NavigateButton_Clicked(System.Object sender, System.EventArgs e) { await this.Navigation.PushAsync(new NewPage1()); }protected override bool OnBackButtonPressed() { return base.OnBackButtonPressed(); }Version with bug
6.0.312
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS15, MacOS 12.4
Did you find any workaround?
not yet, will update once I found one...
Relevant log output