Skip to content

fix: propagate attach() to child in adoptChild when parent is already attached#50

Open
nielsenko wants to merge 1 commit intoNorbert515:mainfrom
nielsenko:fix-adopt-child
Open

fix: propagate attach() to child in adoptChild when parent is already attached#50
nielsenko wants to merge 1 commit intoNorbert515:mainfrom
nielsenko:fix-adopt-child

Conversation

@nielsenko
Copy link
Copy Markdown
Contributor

  • RenderObject.adoptChild() now calls child.attach(owner) when the parent already has a PipelineOwner.
  • Add regression tests covering direct, transitive, container mixin, and single-child mixin adoption scenarios.

This fixes: #49

… attached

RenderObject.adoptChild() now calls child.attach(owner) when the parent
already has a PipelineOwner. Without this, render objects inserted into an
already-attached parent (e.g. after element tree reparenting) never get
their owner set, breaking features like GestureDetector that create mouse
annotations in attach().

Add regression tests covering direct, transitive, container mixin, and
single-child mixin adoption scenarios.
@nielsenko
Copy link
Copy Markdown
Contributor Author

Rebased on 0.5.1

@nielsenko
Copy link
Copy Markdown
Contributor Author

The fix was already landed in #46. You may want to include the tests remaining in this PR, but otherwise feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: RenderObject.adoptChild doesn't propagate attach() to child

1 participant