Opened 10 years ago

Closed 7 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:


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:

  1. Go to:
  2. Delete all the contents of the editor pane (start with empty editor)
  3. Hit the bullet list button
  4. Type some text (e.g. "asdf")
  5. Change the font size to something else (e.g. 22)
  6. Hit ENTER
  8. Repeat the last two steps 5 or 6 times (enter, backspace, etc.)
  9. 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 Jakub Ś

Status: newconfirmed

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.

comment:2 Changed 7 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy