Popup Page's OnBackButtonPressed not being called when tapping back button.
See original GitHub issueCalling PopPopupAsync() is closing my app when in fact it should be going back to the previous page that called the pushpopupasync… seems like a bug from the new version.
Page A (Root page) calls:
Navigation.PushPopupAsync(new ConfigPage())
Then having overridden the back button on the ConfigPage I pop the popup:
protected override bool OnBackButtonPressed() { Navigation.PopPopupAsync(); return base.OnBackButtonPressed(); }
App is getting closed, should return me to the root page.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
onBackPress not called when pop up window is displayed
Solution principle: all button clicks near your popup window will be intercepted, but any BACK button will not be intercepted. So, if you...
Read more >Exit prompt is not working when use Navigation.PushAsync ...
I am showing a prompt for the exit when a user taps the device back button on the home page. My code: private...
Read more >Xamarin forms - Stop/Cancel back button event - Luke Alderton
Because what's more annoying than tapping back for a second time after you questioned if you'd actually pressed the button, only to find...
Read more >Tasks and the back stack
Back tap behavior for root launcher activities; Background and foreground tasks; Multiple activity instances; Multi-window environments ...
Read more >Hardware Back Button for Capacitor & Cordova on Android ...
The hardware back button refers to the physical back button on an Android device and should not be confused with either the browser...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@LeoJHarris See https://github.com/rotorgames/Rg.Plugins.Popup/wiki/Getting-started#android-back-button
Just did and still closing the app
using:
` protected override bool OnBackButtonPressed() { Device.BeginInvokeOnMainThread(async () => { Rg.Plugins.Popup.Contracts.IPopupNavigation popupNavigation = PopupNavigation.Instance; await popupNavigation.PopAsync(true); });