Skip to content

Fix: Removing an outer <template r-if> detaches nested conditional anchors - #102

Merged
koculu merged 1 commit into
mainfrom
template-life-cycle-bug
Oct 24, 2026
Merged

koculu merged 1 commit into
mainfrom
template-life-cycle-bug

Conversation

@koculu

@koculu koculu commented Oct 24, 2026

Copy link
Copy Markdown
Member

Summary

Removing an outer <template r-if> detaches nested conditional anchors before deferred observer cleanup runs. Updating nested state in the same turn could then throw Reference node is not a child of this parent.

Changes

Skip conditional refreshes when either region anchor no longer belongs to its parent. This preserves deferred cleanup and allows the parent to remount with current state.

Add nine regression cases covering immediate and delayed updates, all r-if/r-else-if/r-else transitions, observer cleanup, and remounting.

@koculu
koculu merged commit 2ad0fd5 into main Oct 24, 2026
1 check passed
@koculu
koculu deleted the template-life-cycle-bug branch October 24, 2026 15:52
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.

1 participant