Improved popup dismiss options #2875
reck1610
started this conversation in
New Feature Discussions
Replies: 2 comments 1 reply
-
|
My main problem with the current behavior is, that it is not possible to only prevent dismissal by tap outside of popup. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'd like to add to this support to intercept Android's back button within the popup. This would allow a wizard UI within a popup or control cancelation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
PopupOptions.OnTappingOutsideOfPopupwill only get invoked when the popup is dismissed.If
CanBeDismissedByTappingOutsideOfPopupis set to falsePopupOptions.OnTappingOutsideOfPopupwill not get invoked.Furthermore,
PopupOptions.OnTappingOutsideOfPopupwill get invoked if the back button is pressed on Android.I don't like this.
I propose the following changes:
PopupOptions.OnTappingOutsideOfPopupshould be renamed toPopupOptions.OnDismissPopupOptions.OnTappingOutsideOfPopupshould be created an get fired regardless ofCanBeDismissedByTappingOutsideOfPopupPopupOptions.OnBackButtonPressedshould be createdCanBeDismissedByBackButtonPressedshould be createdCanBeDismissedByTappingOutsideOfPopupandCanBeDismissedByBackButtonPressedwould only change the dismissal behavior.PopupOptions.OnTappingOutsideOfPopupandPopupOptions.OnBackButtonPressedcan be used to implement custom behavior.PopupOptions.OnDismisscan be used to get the current behavior.I have already implemented such a change in https://github.com/reck1610/CommunityToolkit.Maui/tree/improve-popup-dismiss
Beta Was this translation helpful? Give feedback.
All reactions