Opened 10 years ago
Closed 8 years ago
#12301 closed Bug (fixed)
Accumulation of nested span (font size) tags for bulleted lists
Reported by: | andywhite37 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | Cc: |
Description
Note: I saw several similar tickets, so I'm not sure if this is a duplicate.
When you create a bulleted list, type some text, change the font size, then hit Enter, Backspace, Enter, Backspace, etc. the editor creates nested span tags (for font-size style) which accumulate at a seemingly exponential rate.
We found this in our project, but can reproduce here: http://ckeditor.com/demo#full
- Go to: http://ckeditor.com/demo#full
- Delete all the contents of the editor pane (start with empty editor)
- Hit the bullet list button
- Type some text (e.g. "asdf")
- Change the font size to something else (e.g. 22)
- Hit ENTER
- Hit BACKSPACE
- Repeat the last two steps 5 or 6 times (enter, backspace, etc.)
- Notice at the bottom, you see an accumulation of span tags in the editor. Upon inspection, notice many nested span tags to set the font size.
For px font size, this doesn't cause a huge visible issue, but for em font size, it causes the cursor to quickly grow or shrink because of the accumulation of nested em font sizes.
Change History (2)
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.4.3 → 4.0 |
comment:2 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
I could no longer reproduce this problem in CKEditor 4.6.0.
@andywhite37 if you can still reproduce this problem, please leave a comment. I have however tried several times and no extra spans were created.
When you take data from editor with getData() method these spans are removed but they look really bad (such a pile of spans) in elements path.
I was able to reproduce this problem in Blink, Webkit and IE8-10 browsers. In Firefox and IE11 this works fine.
In IE8 This problem is very, let's say, small because IE8 adds only one span (even in CKE 4.x). All other mentioned browsers add number of spans increasing gradually (starting from CKEditor 4.0).
Problem with one span can be in fact reproduced in IE8-10 browsers from CKEditor 3.6.4 rev. [7540] till 4.0 beta. In Webkit and Blink, problem with one span can be reproduced from CKE 3.6.5 rev. [7601] till CKEditor 4.0 beta. Staring from CKEditor 4.0 in Webkit, Blink and IE9-10 there was some change made with makes multiple spans being added.