Frontmatter
| id | 8597 |
| title | Improve DeltaUpdates.changeNodeName to preserve child nodes |
| state | Closed |
| labels | enhancementaiperformance |
| assignees | tobiu |
| createdAt | Jan 13, 2026, 2:50 PM |
| updatedAt | Jan 13, 2026, 2:53 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8597 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 13, 2026, 2:53 PM |
Improve DeltaUpdates.changeNodeName to preserve child nodes
tobiu assigned to @tobiu on Jan 13, 2026, 2:53 PM

tobiu
Jan 13, 2026, 2:53 PM
Input from Gemini 3 Pro:
✦ I have updated
Neo.main.DeltaUpdates.changeNodeNameto useappendChildin a loop instead ofinnerHTML. 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
Currently,
Neo.main.DeltaUpdates.changeNodeNameusesinnerHTMLto 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
changeNodeNameto physically move the child DOM nodes to the new element usingappendChild, preserving their identity and state.