Closed
Description
📝 Provide detailed reproduction steps (if any)
- Create 3 blocks, e.g. used 3 list items.
- Select all of them and create a link.
- Click "Unlink" in the link actions balloon.
✔️ Expected result
All items should be free of the link.
❌ Actual result
The middle item is still linked.
I briefly checked this and the 3 ranges Writer#removeAttribute()
works on internally are looking fine. It feels like the bug is in the setAttributeOnRange()
helper. When I logged the following
console.log( val.item, valueBefore, valueAfter );
in the walker inside it was
TextProxy {textNode: Text, data: "tem", offsetInText: 0} undefined "foo"
Element {parent: RootElement, _attrs: Map(2), name: "listItem", _children: NodeList} undefined undefined
TextProxy {textNode: Text, data: "third", offsetInText: 0} undefined "foo"
because the walker created with shallow: true
. When I got rid of this option, the bug is gone and more items are logged
TextProxy {textNode: Text, data: "tem", offsetInText: 0} undefined "foo"
Element {parent: RootElement, _attrs: Map(2), name: "listItem", _children: NodeList} undefined undefined
TextProxy {textNode: Text, data: "second item", offsetInText: 0} undefined "foo"
Element {parent: RootElement, _attrs: Map(2), name: "listItem", _children: NodeList} "foo" undefined
TextProxy {textNode: Text, data: "thir", offsetInText: 0} undefined "foo"
P.S. The bug could also be in getMinimalFlatRanges()
.
📃 Other details
- Browser: Chrome
- OS: Mac
- CKEditor version: v22.0.0
It's not a regression, I checked in v16.0.0 and it's all the same.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Activity
panr commentedon Sep 11, 2020
This bug appeared after the changes from this commit: 0ed523e#diff-a3ae70b600cbe7a13e75771a6a5519acR81
I would label it as
type:regression
. However, I know some of those changes were intentional...oleq commentedon Sep 11, 2020
Are you sure this is the right commit? Because I'm experiencing the same bug in releases as old as v16.0.0.
panr commentedon Sep 11, 2020
git bisect
told me that this is the one ;-P Reverting that commit fixes this issue for my case (regarding multi-block link marker issue).Merge pull request #8495 from ckeditor/i/8030