When selecting the whole contents of an element that has an execCommand that creates the same style (e.g. <i> or <em> for the 'italic' execCommand) and typing, the editor replaces that element with a span with the style equivalent for the element. For example <i> or <em> becomes 'font-style: italic'.
I believe that this is currently by design, see bug 13490.
(In reply to comment #1) > I believe that this is currently by design, see bug 13490. > The problem isn't so much that it inserts spans on the 'italic' execCommand but more that it replaces any italicized (em, i) tag with spans. It shouldn't meddle with stuff it didn't put there.
*** This bug has been marked as a duplicate of bug 23892 ***