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

Differ.getChanges() throws when moving node from document to document fragment #4299

Closed
szymonkups opened this issue Mar 6, 2018 · 0 comments · Fixed by ckeditor/ckeditor5-engine#1339
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@szymonkups
Copy link
Contributor

When differ.getChanges() is used after node is moved from document to document fragment it throws.
Model writer tests contain examples where node is moved from document to document fragment so I assume it's a valid use case: https://github.com/ckeditor/ckeditor5-engine/blob/a0ad8fee1606f5a0f42e70c96d8f1ceca6c0f919/tests/model/writer.js#L261-L282

I've noticed this when working on https://github.com/ckeditor/ckeditor5-engine/issues/1267 - i needed to use differ on document#change event and writer tests went red. I will push minimal failing test to the issue branch.

szymonkups referenced this issue in ckeditor/ckeditor5-engine Mar 6, 2018
Fix: It should not be possible to move a `model.Node` from a `model.Document` to a `model.DocumentFragment`. Closes #1337.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 14 milestone Oct 9, 2019
@mlewand mlewand added type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants