Opening and closing the source editor adds tags with non-breaking spaces to top of content
Created by: cdaveb
I've noticed that there seems to be an issue where if you open and then close the codemirror source editor in TinyMCE it seems to insert empty tags (p tags if forced_root_block is not set to div, otherwise div tags) at the top of the content. This only seems to happen if you close the editor and your cursor is not within an existing tag. It will continue to keep inserting blank tags at the start (i.e. <p> </p>
or <div> </div>
) at the top of the source everytime you close and reopen the editor. I can't reproduce this issue in the standard TinyMCE source editor- it only happens when I use codemirror.
For example, see these pictures of what happens each time you reopen the source editor and close it.