Skip to content

test(element): cover reparenting an element after its screen is destroyed#8899

Merged
willeastcott merged 1 commit into
mainfrom
test/1151-element-reparent-after-screen-destroy
Jun 14, 2026
Merged

test(element): cover reparenting an element after its screen is destroyed#8899
willeastcott merged 1 commit into
mainfrom
test/1151-element-reparent-after-screen-destroy

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Adds a regression test for #1151: an element reparented to null whose screen is then destroyed (e.g. on scene unload) can be reparented again without throwing this.screen.screen is undefined.

The behaviour is already correct in current code — the screen's onBeforeRemove clears the dangling screen reference on its bound elements — so this just locks it in. The existing tests covered reparenting to a non-screen parent and destroying the element, but not this combination.

🤖 Generated with Claude Code

…oyed

Regression test for #1151: an element reparented to null, whose screen is then destroyed (e.g. on scene unload), can be reparented again without throwing 'this.screen.screen is undefined'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@willeastcott willeastcott self-assigned this Jun 14, 2026
@willeastcott willeastcott added the area: ui UI related issue label Jun 14, 2026
@willeastcott willeastcott merged commit 9fc551e into main Jun 14, 2026
9 checks passed
@willeastcott willeastcott deleted the test/1151-element-reparent-after-screen-destroy branch June 14, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui UI related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant