ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Text wrapping is incorrect after deleting character

Open Haegin opened this issue 8 years ago • 1 comments

Are you reporting a feature request or a bug?

Bug

Deleting text before a space character causes the following space to change to a non-breaking space. This potentially causes words at the end of the line to wrap onto the next line. If the following word is close to the line length limit (or if you hit this bug several times) the following line breaks part way through a word.

Provide detailed reproduction steps (if any)

  1. Open the CKEditor homepage
  2. Switch to the Inline Editor example tab
  3. Pick one of the boxes and, one a line in the middle, start deleting the characters before each space starting with the last word on the line.

ckeditor bug

Expected result

The character should be deleted and, if the next word would now fit on the same line, it should move up a line, with the wrapping adjusting accordingly.

Actual result

The word that's just lost a character now wraps onto the following line. If you repeat this a few times you end up with wrapping problems on the following line and the line the word started on is left with obvious space at the end as it's wrapping too early.

Other details

This is caused by CKEditor changing the space after the character that was deleted into a non-breaking space.

Haegin avatar Sep 27 '17 19:09 Haegin

Might be related: https://github.com/ckeditor/ckeditor4/issues/3819

sculpt0r avatar Aug 12 '21 07:08 sculpt0r