Opened 11 years ago
Closed 11 years ago
#11258 closed Bug (fixed)
Empty spans not being removed
Reported by: | Marek Lewandowski | Owned by: | Piotr Jasiun |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.3.1 |
Component: | General | Version: | 4.3.1 |
Keywords: | Cc: |
Description (last modified by )
occures at current master, was not present in 4.3 release
Extra, empty span is left in certian situations
- open any sample with CKEditor (i.e. samples/replacebyclass.html)
- set source to following html
<h3>Type the title here</h3> <p>Type the text here</p>
- go back to wysiwyg mode
- open search dialog
- type the text in find textfield
- click find
- close dialog
--- note already you have extra span left ---
You may now move cursor elsewhere and go back to the text substring, and span will still be there.
Expected result:
Produced source code:
<h3>Type the title here</h3> <p>Type the text here</p>
Current result:
Code has extra span:
<h3>Type the title here</h3> <p>Type <span>the text</span> here</p>
additional info:
- you can insert multiple ammount of spans, by clicking find multiple times, none of them will be cleaned
- i've reproduced it witch chrome and firefox @ Win8
Change History (8)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:4 Changed 11 years ago by
Owner: | set to Piotr Jasiun |
---|---|
Status: | confirmed → review |
Changes in t/11258 and corresponding test branch.
comment:5 Changed 11 years ago by
What I do not like in this fix is the fact that I put changes in removeFromInsideElement
. This method is called only from applyStyle
but its name does not suggest this. I've added some description to removeFromInsideElement
but I don't feel good about this.
comment:6 Changed 11 years ago by
Yes, it's not plainly clear, but the comment made it understandable. I'm ok with such solution. Because it makes sense and also, because there's no other way except reorganising big part of that code :).
comment:7 Changed 11 years ago by
Milestone: | → CKEditor 4.3.1 |
---|---|
Status: | review → review_passed |
I moved tests to style/applyremove. Those tests in style/editor are meant to test more than style system itself - they check if selection is ok and some other aspects of integration (like editor configuration).
I also pushed one commit to dev.
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
- git:59c2758
- tests:6c25949
git:47c4514ba2e7225de2ec86d4eeec61b51adff5de is the first bad commit.