Opened 6 years ago

Last modified 5 years ago

#10358 confirmed Bug

[IE]:Editor removes   if after ­

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IE Cc:

Description

  1. Go to any page in editor and clear editor contents (new page command)
  2. Switch to source and insert <p>&shy;&nbsp;</p>
  3. Switch to WYSIWYG and to Source again

Result: <p>&shy;</p> non-breaking spaced is removed.

Problem occurs in all versions of IE from CKEditor 4.0 (it works in CKE 3.0 - 4.0 beta).

Change History (2)

comment:1 Changed 6 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 5 years ago by Henning

CKEditor 4.3.5 still removes &nbsp; at the end of block elements, independently from the fillEmtpyBlocks configuration value. Analysis from a debugging session shows that the removal is done in the toDataFormat Filter, step 11, via the cleanBogus function under the following condition:

if ( !CKEDITOR.env.needsBrFiller && isOutput 
      && ( !atBlockEnd || node.parent.name in textBlockTags ) )

where

env.needsBrFiller = env.gecko || env.webkit || ( env.ie && version > 10 );

The variable name needsBrFiller seems to indicate that CKEditor intends to remove nbsp that it might have inserted before. But if there is no marker, CKEditor has no chance to recognize who inserted the nbsp at this point. Given this, CKEditor should not remove these chars, or, if there are doubts or version compatiblity requirements, add a configuration option, e.g., trimTrailingWhitespace, or the like.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy