-
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
If PlatformView has been removed use index #23408
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
tj-devel709
previously approved these changes
Jul 2, 2024
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.
LGTM
/rebase |
1 similar comment
/rebase |
github-actions
bot
force-pushed
the
fix_23278
branch
from
July 3, 2024 21:20
baa81e7
to
2e5a9a1
Compare
jfversluis
reviewed
Jul 4, 2024
mattleibow
previously approved these changes
Jul 4, 2024
mattleibow
approved these changes
Jul 4, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Jul 5, 2024
This reverts commit a4b1044.
PureWeen
added a commit
that referenced
this pull request
Jul 5, 2024
samhouts
added
fixed-in-8.0.70
fixed-in-net9.0-nightly
This may be available in a nightly release!
labels
Aug 2, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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
There might be scenarios where users are watching when views are removed from the visual tree and then disconnecting the handler. This accounts for those scenarios.
Ideally, we should make the operation of removing and adding a view somewhat atomic. It feels a little bit off that we fire "DecendentRemoved/Added" on Element before removing the platformview from the platform layout.
I think this change is useful either way, as it just makes the code path a bit more robust.
One thing to note about
#23278
Having attached behaviors that call DisconnectHandler on everything when they leave the visual tree probably still has a few gotcha scenarios. If Mopups wants to retain that behavior, I would recommend that they dispatch that disconnect on the UI Thread after things have been cleaned up a bit so they can ensure nothing inside MAUI still needs that handler.
Issues Fixed
Fixes #23278