A reference in DocumentFragment to RadDocument (CopySource property) can cause a memory after copy-paste between RadDocument.
Workaround:
public static bool ReleaseClipboardExReferences(
RadDocument document)
{
dynamic clipboardEx = new DynamicProxyObject(typeof(ClipboardEx));
if (clipboardEx.documentClipboardData?.CopySource is DynamicProxyObject copySource
&& object.ReferenceEquals(copySource.Instance, document))
{
clipboardEx.documentClipboardData = null;
return true;
}
if (clipboardEx.CopiedDocumentFragment?.Fragment?.CopySource is DynamicProxyObject fragmentCopySource
&& object.ReferenceEquals(fragmentCopySource.Instance, document))
{
clipboardEx.CopiedDocumentFragment = null;
return true;
}
return false;
}
private bool SetLocation(Point location)
{
if (this.HorizontalOffset != location.X || this.VerticalOffset != location.Y)
{
this.HorizontalOffset = location.X;
this.VerticalOffset = location.Y;
return true;
}
// added the following 5 lines to trigger the popup to recalculate it's location
else
{
this.VerticalOffset++;
this.VerticalOffset--;
}
return false;
}
When the copied document fragment is replaced during paste within a single RadDocument:
ClipboardEx.SetDocument(new DocumentFragment(doc));
Ordered list are not pasted correctly.
Workaround:
Bypass paste and use the InsertFragment API
this.radRichTextBox.InsertFragment(new DocumentFragment(doc)); e.Cancel = true;
Use the attached project to reproduce:
- Click the first button so the image is changed
- Click the second button and examine the exported HTML
Expected: the Uri is exported
Actual: the Uri is not exported.
Workaround:
p.Inlines.AddAfter(image, image2);
When the MEF catalog of RadRichTextBox is predefined, the PasteOptionsPopup is not automatically loaded and causes NullReferenceException in the presenter when the users press Ctrl or Esc.
Workaround: Add typeof(PasteOptionsPopup) to the catalog.
The document styles are not respected because of wrongly imported custom style name after copy-paste from MS Word and exported to HTML.
Workaround: avoid using styles with braces in their name.
To reproduce:
- Select several words by holding the control key.
- Paste some text.
Result: the first word is replaced, the other are deleted
Expected: the text should be pasted in all selected places
Workaround:
private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)To reproduce:
- Hold the control key and double click a word
Actual: the entire paragraph is selected
Expected: the current word should be selected, the existing selection should be extended.
As suggested in the orginal support ticket 1430154 I'm opening a separate bug reprot for the RadRichTextBox.
Visual Studio 2019 solution to reproduce the problem is attached to the bug report.