嵌套节点node.clone({deep: true})无效
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
嵌套节点node.clone({deep: true})无效,cloneNode.store.data.children有值,但是cloneNode.children和cloneNode._children没有值

clone.setChildren(embeds), _children 在这里设置了但还是空数组


### Your Example Website or App
https://codesandbox.io/p/sandbox/elastic-wood-shyyk8?file=%2Findex.ts%3A10%2C27
### Steps to Reproduce the Bug or Issue
点击嵌套节点,复制的新节点没有子节点
### Expected behavior
deep: true能正常工作
### Screenshots or Videos
_No response_
### Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 2.11.1]
### Additional context
_No response_
Contributor guide
Research direction
Start with the linked CodeSandbox reproduction and the node.clone({deep: true}) path described in the issue. Inspect how cloneNode.store.data.children relates to cloneNode.children and cloneNode._children, including the clone.setChildren(embeds) call. Done means clicking a nested node and copying it produces a clone whose child nodes are available through the expected properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100