File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,16 @@ public async Task CloseAsync(PopupResult result, CancellationToken token = defau
104104
105105 popupClosedEventManager . HandleEvent ( this , result , nameof ( PopupClosed ) ) ;
106106 }
107-
108- // Prevent the Android Back Button from dismissing the Popup if CanBeDismissedByTappingOutsideOfPopup is true
107+
109108 protected override bool OnBackButtonPressed ( )
110109 {
110+ // Only close the Popup if PopupOptions.CanBeDismissedByTappingOutsideOfPopup is true
111111 if ( popupOptions . CanBeDismissedByTappingOutsideOfPopup )
112112 {
113113 CloseAsync ( new PopupResult ( true ) , CancellationToken . None ) . SafeFireAndForget ( ) ;
114114 }
115115
116+ // Always return true to let the Android Operating System know that we are manually handling the Navigation request from the Android Back Button
116117 return true ;
117118 }
118119
You can’t perform that action at this time.
0 commit comments