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.

Popup Page's OnBackButtonPressed not being called when tapping back button.

See original GitHub issue

Calling 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:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
LeoJHarriscommented, Jul 27, 2018

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); });

        return true;
    }`
Read more comments on GitHub >

github_iconTop 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 >

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