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

Markers created by a data pipeline are not marked as affectsData #4438

Closed
oskarwrobel opened this issue Oct 23, 2018 · 3 comments · Fixed by ckeditor/ckeditor5-engine#1584
Closed
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@oskarwrobel
Copy link
Contributor

When marker is created as a result of the data pipeline conversion it should be marked as affectsData because is a part of the data.

@oskarwrobel oskarwrobel self-assigned this Oct 23, 2018
@oskarwrobel oskarwrobel changed the title Markers created by a data pipeline are not marked ad affectsData Markers created by a data pipeline are not marked as affectsData Oct 23, 2018
@ma2ciek
Copy link
Contributor

ma2ciek commented Oct 24, 2018

As far as I understand this problem, the issue is caused by the Writer#insert() method, which doesn't mark DocumentFragment's markers as affecting data.

https://github.com/ckeditor/ckeditor5-engine/blob/master/src/model/writer.js#L198-L209

I'll check my assumption.

@oskarwrobel
Copy link
Contributor Author

https://github.com/ckeditor/ckeditor5-engine/blob/master/src/model/writer.js#L207 looks like that's the place we need to change. I think we can assume that all markers that are created as a conversion result always affects data. At least for now.

@ma2ciek
Copy link
Contributor

ma2ciek commented Oct 24, 2018

It can be reproduced by getting the content containing markers with editor.getData() and then setting it on the editor with editor.setData().

oskarwrobel referenced this issue in ckeditor/ckeditor5-engine Oct 24, 2018
Fix: Made markers created by `Writer#insert()` affect data. Closes #1583.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 21 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed 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