This is a migrated thread and some comments may be shown as answers.

Crash in Telerik editor

3 Answers 68 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
ASF
Top achievements
Rank 1
ASF asked on 06 Dec 2013, 12:51 PM
Hello, browser crashes when I have selected a text  in the header or footer and then switch to main document body by doubleclicking to its area. This doesn't happen on demos though. There's something wrong with the SelectionMiniToolBar.
This is the stack trace:
MS.Internal.WrappedException: Error HRESULT E_FAIL has been returned from a call to a COM component.
 
 
INNER EXCEPTION:
System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, Boolean b)
   at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
   at Telerik.Windows.Controls.RichTextBoxUI.MiniToolBarBase.HidePopup()
   at Telerik.Windows.Controls.RichTextBoxUI.SelectionMiniToolBar.Hide()
   at Telerik.Windows.Documents.UI.Extensibility.MiniToolBarManager.HideSelectionMiniToolBar()
   at Telerik.Windows.Controls.RadRichTextBox.OnIsSelectionMiniToolBarEnabledChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at Telerik.Windows.Documents.UI.HeaderFooterPresenterBase.UpdateEditMode()
   at Telerik.Windows.Documents.UI.HeaderFooterPresenterBase.Update(SectionLayoutBox associatedSectionBox, Boolean isInEditHeaderFooterMode, Boolean shouldFocus)
   at Telerik.Windows.Documents.UI.HeaderFooterContainer.UpdateUI(SectionLayoutBox sectionBox)
   at Telerik.Windows.Documents.UI.DocumentPagePresenter.UpdateHeaderFooterUI(SectionLayoutBox sectionBox)
   at Telerik.Windows.Documents.UI.DocumentPagePresenter.UpdateUILayersViewPortSize(RectangleF viewPort)
   at Telerik.Windows.Documents.UI.DocumentPagePresenter.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

 Could you please address the issue?

3 Answers, 1 is accepted

Sort by
0
ASF
Top achievements
Rank 1
answered on 10 Dec 2013, 07:36 AM
This happens if put RichTextBox in ChildWindow (or RadWindow). That's why it doesn't happen on demos.
0
Vasil
Telerik team
answered on 10 Dec 2013, 12:56 PM
Hi,

Thank you for writing.

This is a known issue for us and we have it in our product backlog. Unfortunately, at this time we cannot specify when it would be fixed. However, as a workaround you could disable the SelectionMiniToolBar when editing Header/Footer using the following code:
void rtb_ActiveDocumentEditorChanged(object sender, Telerik.Windows.Documents.UI.ActiveDocumentEditorChangedEventArgs e)
{
    if (e.DocumentEditorType == Telerik.Windows.Documents.UI.DocumentEditorType.MainDocument)
    {
        this.editor.IsSelectionMiniToolBarEnabled = true;
    }
    else
    {
        this.editor.IsSelectionMiniToolBarEnabled = false;
    }
}

I hope this is helpful. Please, do not hesitate to get back to us if you have additional comments or questions.

Regards,
Vasil
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
ASF
Top achievements
Rank 1
answered on 10 Dec 2013, 01:12 PM
Yes, this is exactly the same workaround I did.
Thanks.
Tags
RichTextBox
Asked by
ASF
Top achievements
Rank 1
Answers by
ASF
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or