-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Window.ModalPopping closes app when e.Cancel = true #23462
Copy link
Copy link
Closed
Labels
area-navigationNavigationPageNavigationPagep/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/try-latest-versionPlease try to reproduce the potential issue on the latest public versionPlease try to reproduce the potential issue on the latest public versions/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Description
Metadata
Metadata
Assignees
Labels
area-navigationNavigationPageNavigationPagep/2Work that is important, but is currently not scheduled for releaseWork that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been revieweds/try-latest-versionPlease try to reproduce the potential issue on the latest public versionPlease try to reproduce the potential issue on the latest public versions/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
Using a custom Window class, when hooking into the Window.ModalPopping event, setting the
e.Cancel = truecauses the app to close when the Android hardware button is pressed for a modal navigation stack.The offending code can be found in the App.xaml.cs file
Steps to Reproduce
What I expect to happen is for the modal view to not be popped, and the app to stay running on screen.
For more context, the Prism Library uses a custom Window to take control of the navigation process on a go back for the modal navigation stack. We need to cancel the built-in popping that is invoked by the hardware back button, and use our pop code instead. This gives us the ability to prevent a navigation based on our
IConfirmationRequestinterface. If the result of ourIConfirmationRequestistruewe will do the pop modal again, if the result isfalse, we will not pop the modal and keep the user on the current view.Link to public reproduction project repository
https://github.com/brianlagunas/WindowModalPoppingBug
Version with bug
8.0.61 SR6.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android API 34
Did you find any workaround?
No
Relevant log output
No response