Repository navigation
fix(manipulation): connect sibling links in cloned selections - #5763
xiaoyao-666-coder wants to merge 1 commit into
Conversation
Use the DOM update helper for the synthetic clone document so sibling traversal and child selectors agree. Cover HTML/XML traversal, removal, and text/comment links.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
[Medium impact] The PR appears safe to merge.
|
Cloning multiple nodes leaves their
prevandnextreferences null even though they share a synthetic document parent. For example, cloning three list items makesnext()return an empty selection and:first-childmatch all three, whilesiblings()still sees the other items.Use the existing DOM update helper when attaching clones to their document so sibling traversal and child selectors agree. Four regression cases cover HTML/XML traversal, selectors, removal of a middle clone, and text/comment links.
Fixes #5762.
Validation on Node.js 24.22.1:
AI assistance: reproduction, implementation, tests, and this description were prepared with Codex.