-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prism.Windows - hardware back button press is not firing the BackRequested event first #867
Comments
I think the only way currently you could address that is by disabling the back button in PageB until it is willing to allow the navigation to proceed. The docs show a similar approach here: We have actually had a long standing issue to try to address this: Unfortunately none of us has had the time to dig into addressing that one, which I think would address your scenario as well. We always welcome community PRs with a solution! |
Short-term solution is use IDeviceGestureService.GoBackRequested instead of SystemNavigationManager.GetForCurrentView().BackRequested. But PrismApplication class does not check e.Handled inside its OnGoBackRequested. I can create PR for it. |
@Mr1Penguin, Thanks a lot for your contribution. Have you created PreRelease already? if yes, can you provide me the details? Thank you, |
@rsvsakthi |
Closing this since it was fixed in PR #1019 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have two pages in my application PageA navigates to PageB. In PageB, I am handling the BackRequested event to dismiss a popup (shown as a control) and not going back to PageA. I have specified e.Handled = true.
When the user is in PageB and presses back button on device, onNavigatedTo in PageA is getting executed first then it comes to BackRequested event. So I am not able to prevent the user from going back to PageA.
Can you please let me know how to handle this without going to previous pages OnNavigatedTo?
Thank you,
Sakthivel R
The text was updated successfully, but these errors were encountered: