LearnNewsExamplesServices
Frontmatter
id8597
titleImprove DeltaUpdates.changeNodeName to preserve child nodes
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtJan 13, 2026, 2:50 PM
updatedAtJan 13, 2026, 2:53 PM
githubUrlhttps://github.com/neomjs/neo/issues/8597
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 13, 2026, 2:53 PM

Improve DeltaUpdates.changeNodeName to preserve child nodes

Closed v11.21.0 enhancementaiperformance
tobiu
tobiu commented on Jan 13, 2026, 2:50 PM

Currently, Neo.main.DeltaUpdates.changeNodeName uses innerHTML to transfer children when a tag name changes. This is a destructive operation that causes all descendant nodes to lose their state (focus, scroll position, input values) and breaks any external references to them.

The goal is to modify changeNodeName to physically move the child DOM nodes to the new element using appendChild, preserving their identity and state.

tobiu added the enhancement label on Jan 13, 2026, 2:50 PM
tobiu added the ai label on Jan 13, 2026, 2:50 PM
tobiu added the performance label on Jan 13, 2026, 2:50 PM
tobiu referenced in commit 4ac2da8 - "perf: Preserve child nodes during tag name change (#8597) on Jan 13, 2026, 2:52 PM
tobiu assigned to @tobiu on Jan 13, 2026, 2:53 PM
tobiu
tobiu Jan 13, 2026, 2:53 PM

Input from Gemini 3 Pro:

✦ I have updated Neo.main.DeltaUpdates.changeNodeName to use appendChild in a loop instead of innerHTML. This change ensures that when a tag name is modified, the child nodes are physically moved to the new parent element, preserving their internal state (focus, scroll position, input values) and event listeners.

Changes have been pushed to dev.

tobiu closed this issue on Jan 13, 2026, 2:53 PM