Skip to content
New issue

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

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

Already on GitHub? # to your account

view.DowncastWriter does not handle partial unwrapping in nested attribute elements #4502

Closed
scofalik opened this issue Apr 1, 2019 · 2 comments · Fixed by ckeditor/ckeditor5-engine#1719
Assignees
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@scofalik
Copy link
Contributor

scofalik commented Apr 1, 2019

For given view and selection:

<p>
    [<i>
        <span class="foo bar">Foo</span>
    </i>]
</p>

Unwrapping <span class="foo"> will not do anything.

DowncastWriter#unwrap() is incorrectly implemented in this regard. When it enters a child, it only looks for full matches, there's no partial unwrapping there.

EDIT: AFAICS the selection doesn't need to be exactly on the <i> element, it can be somewhere inside the <span>.

@scofalik scofalik self-assigned this Apr 1, 2019
@scofalik
Copy link
Contributor Author

scofalik commented Apr 1, 2019

Also -- will have to check if wrapping works correctly.

@scofalik
Copy link
Contributor Author

scofalik commented Apr 2, 2019

Wrapping is incorrect too.

Reinmar referenced this issue in ckeditor/ckeditor5-engine Apr 3, 2019
Fix: `view.DowncastWriter` will now correctly wrap and unwrap nested attribute elements. Closes #1716. Closes ckeditor/ckeditor5-font#30.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 23 milestone Oct 9, 2019
@mlewand mlewand added module:view type:bug This issue reports a buggy (incorrect) behavior. package:engine labels Oct 9, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
package:engine type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
2 participants