Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of model.Element.clone() is weird #3888

Closed
Reinmar opened this issue Nov 17, 2016 · 0 comments · Fixed by ckeditor/ckeditor5-engine#934
Closed

Behaviour of model.Element.clone() is weird #3888

Reinmar opened this issue Nov 17, 2016 · 0 comments · Fixed by ckeditor/ckeditor5-engine#934
Assignees
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 17, 2016

It surprised me that clone( deep == false ) returns an element with children. It's a common practice that shallow clone returns the same element but without any children.

@scofalik scofalik self-assigned this Apr 24, 2017
Reinmar referenced this issue in ckeditor/ckeditor5-engine Apr 24, 2017
Other: `model.Element#clone()` now does not clone children when passed `false` and recursively clones children when passed `true`. Closes #689.

BREAKING CHANGE: `model.Element#clone()` does not clone children when not in the `deep` mode. See #689.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 10 milestone Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants