-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix Scoping of MauiContext as it relates to Modal Pages #3361
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PureWeen
commented
Nov 11, 2021
@@ -4,7 +4,7 @@ | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
mc:Ignorable="d" Background="Purple" | |||
mc:Ignorable="d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙄
jsuarezruiz
approved these changes
Nov 12, 2021
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
PureWeen
changed the title
Fix Scoping of MauiContext as it relates to Modal Pages
[WiP] Fix Scoping of MauiContext as it relates to Modal Pages
Nov 12, 2021
PureWeen
force-pushed
the
modal_embbedded_nav_fixes
branch
from
November 16, 2021 23:15
52ad459
to
e1c8c42
Compare
PureWeen
force-pushed
the
modal_embbedded_nav_fixes
branch
from
November 17, 2021 20:22
fd20fa0
to
956c463
Compare
PureWeen
force-pushed
the
modal_embbedded_nav_fixes
branch
from
November 17, 2021 20:25
956c463
to
297fce7
Compare
PureWeen
commented
Nov 17, 2021
@@ -287,7 +287,9 @@ protected virtual bool OnBackButtonPressed() | |||
var canceled = false; | |||
EventHandler handler = (sender, args) => { canceled = true; }; | |||
window.PopCanceled += handler; | |||
Navigation.PopModalAsync().ContinueWith(t => { throw t.Exception; }, CancellationToken.None, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.FromCurrentSynchronizationContext()); | |||
Navigation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other way just swallows this exception and leaves you confused why nothing is happening
PureWeen
changed the title
[WiP] Fix Scoping of MauiContext as it relates to Modal Pages
Fix Scoping of MauiContext as it relates to Modal Pages
Nov 18, 2021
samhouts
added
the
fixed-in-6.0.101-preview.11.3
Look for this fix in 6.0.101-preview.11.3!
label
Aug 2, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Setup Modal Pages with their own NavigationRoot on Windows and Android.
Remove the
OnBackButtonPressing
event and instead just usesOnBackButtonPressed
to implement conditional behavior.Remove the ctor on
MauiContext
that takes a parentMauiContext
PR Checklist
Does this PR touch anything that might affect accessibility?
If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.