Frontmatter
| id | 8600 |
| title | Preserve form field state in changeNodeName |
| state | Closed |
| labels | enhancementaicore |
| assignees | tobiu |
| createdAt | Jan 13, 2026, 3:14 PM |
| updatedAt | Jan 13, 2026, 3:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8600 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 13, 2026, 3:18 PM |
Preserve form field state in changeNodeName
tobiu assigned to @tobiu on Jan 13, 2026, 3:17 PM

tobiu
Jan 13, 2026, 3:18 PM
Input from Gemini 3 Pro:
✦ I have updated
changeNodeNameto explicitly copy form field state properties.Changes: Before replacing the old node, the method now checks and copies the following properties if they differ from the default:
value(for Inputs, TextAreas, Selects)checked(for Checkboxes, Radios)selectedIndex(for Selects)This ensures that user interaction state is preserved even if the wrapping tag or the element itself is technically replaced in the DOM. Changes pushed to
dev.
tobiu closed this issue on Jan 13, 2026, 3:18 PM
We recently improved
Neo.main.DeltaUpdates.changeNodeNameto preserve child nodes and scroll state. However, it currently only copies attributes. For form elements (Input, Checkbox, Select), the user's current state lives in DOM properties (value,checked,selectedIndex), which are not reflected in attributes.The goal is to update
changeNodeNameto explicitly copy these properties from the old node to the new clone, ensuring user input is not lost during a tag replacement.