Pressing Delete at the end of a paragraph leads to merging the content of the current paragraph with the next block. However, when the deleted paragraph contains a single space, the layout stops updating after pressing Delete.
Steps to reproduce:
1. Create two tables with paragraph between them
2. Add a space to the paragraph
3. Press Delete (when the caret is just after the space)
Observed: The layout is not updated after this and further modifications
Workaround:
Delete the space before deleting the paragraph:
private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if (e.Command is DeleteCommand && this.radRichTextBox.Document.Selection.IsEmpty)
{
Paragraph currentParagraph = this.radRichTextBox.Document.CaretPosition.GetCurrentParagraphBox().AssociatedParagraph;
if (currentParagraph.Inlines.Count==1 && string.IsNullOrWhiteSpace((currentParagraph.Inlines.First as Span).Text))
{
this.radRichTextBox.Delete(true);
}
}
}