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

Unmounting nested widgets doesn't call unmount() on nested children #138

Closed
ecton opened this issue Jan 13, 2024 · 0 comments
Closed

Unmounting nested widgets doesn't call unmount() on nested children #138

ecton opened this issue Jan 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ecton
Copy link
Member

ecton commented Jan 13, 2024

When debugging some oddities of reusing widgets in cushy-show, I realized that nested widgets never receive their unmounted events.

I tried quickly solving it, but it's a little tricker than it appears at first glance. When we go through to clean up each node, we gather our list of nodes to remove, but at this point in the loop, we can't invoke the unmounted events, because we already have the tree locked.

We're going to need to refactor widget unmounting to happen in phases so that the tree lock can be held and released. I think we need to make sure unmounted is called on every node we're about to unmount before we begin altering the tree.

@ecton ecton added the bug Something isn't working label Jan 13, 2024
@ecton ecton closed this as completed in 9c4ae93 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant