-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[regression/8.0.0-preview.3.8149] - modal to modal doesnt call OnNavigatedTo #17978
Comments
Verified this on Visual Studio Enterprise 17.8.0 Preview 3.0(8.0.0-rc.2.9373). This issue does not repro on Windows 11, Android 13.0-API33 and iOS 16.4 with below Project: |
Hi @Zack-G-I-T. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@XamlTest if you look at the class you are breaking on - it is the same one each time. "TestModalPage.xaml.cs". It never hits the "TestModalPage2.xaml.cs" OnNavigatedTo. |
Confirmed that this regressed between 8.0.0-preview.2.7871 and 8.0.0-preview.3.8149. #13025 seems sus. Note that in preview 2, the NavigatedTo event fires for Modal1 every time, but it also fires the event for the modal on top. |
Yes, you are right, thanks for reminder. It never hits the "TestModalPage2.xaml.cs" OnNavigatedTo. |
When navigating between Modal pages, Shell was returning the first page in the stack as the current page, so that page was the one being notified about the navigation. Instead, we should return the last page from the stack. Fixes #17978
When navigating between Modal pages, Shell was returning the first page in the stack as the current page, so that page was the one being notified about the navigation. Instead, we should return the last page from the stack. Fixes #17978
Description
When you are on a modal page and navigate to another modal page using Shell.Current.GoToAsync, the OnNavigatedTo method is called on the first modal page - but never on the second.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Zack-G-I-T/Net8ModalOnNavigatedTo
Version with bug
8.0.0-preview.3.8149
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.0-preview.2.7871
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: