Skip to content
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

[BUG] BindingContext cleared when performing absolute navigation #3113

Open
renduNP opened this issue Apr 2, 2024 · 3 comments
Open

[BUG] BindingContext cleared when performing absolute navigation #3113

renduNP opened this issue Apr 2, 2024 · 3 comments
Labels
bug Commercial Plus 🚀 Issue or Pull Request opened by a Commercial Plus license holder MAUI to verify
Milestone

Comments

@renduNP
Copy link

renduNP commented Apr 2, 2024

Description

Our Developers have observed an issue that affects Android while using absolute navigation.
E.g. When performing absolute navigation from PageA to a TabbedPage, it appears that PageA's BindingContext is cleared before PageA is removed from UI and the navigation completes.
This results in any controls that are bound to PageA's BindingContext will reset/update causing the UI of PageA to appear incorrectly until the navigation completes. It also appears that the complexity of the tabs being navigated to will affect the time taken for navigation to complete, which can cause PageA to remain visible for several seconds with incorrect UI.

We have observed this issue on version 9.0.436-pre, we are unaware of a version where this issue does not occur.

Steps to Reproduce

See Sample app to reproduce the issue here -
PrismMauiApp2.zip

Platform with bug

.NET MAUI

Affected platforms

Android

Did you find any workaround?

No response

Relevant log output

No response

@dansiegel dansiegel added Commercial Plus 🚀 Issue or Pull Request opened by a Commercial Plus license holder MAUI labels Apr 2, 2024
@dansiegel dansiegel added this to the Prism 9.0 milestone Apr 3, 2024
@dansiegel
Copy link
Member

@renduNP is this issue specific to Android? Prism shouldn't have any platform specific behaviors here.

@BruceTheBrick
Copy link

@dansiegel I work with @renduNP and assisted in the investigation on this issue.
We have not been able to reproduce this issue on iOS but we're not exactly sure why.

The best example we were able to recreate in the reproduction sample was when navigating absolutely from the ModalPage. There is a button labeled "Hidden button" that is hidden due to it's IsVisible property being bound to the ImageVisable property in the associated ViewModel. When navigating away, we think the BindingContext is cleared too soon and the "Hidden button" becomes visible. This isn't something we've observed on iOS.
We're happy to help investigate however possible, please let us know how we can help.

@renduNP
Copy link
Author

renduNP commented May 27, 2024

@dansiegel - As per last communication sent, understand this is particularly tricky to fix because it is due to some platform specific behaviour.
If you can share some of the possible solutions discussed with the MAUI team in the background, sure someone from our team/GitHub community would be keen in helping to test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Commercial Plus 🚀 Issue or Pull Request opened by a Commercial Plus license holder MAUI to verify
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants