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

Not getting focus back after using combobox of RadRichTextBoxRibbonUI when LayoutMode=Flow

1 Answer 109 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
JF
Top achievements
Rank 1
JF asked on 24 Apr 2017, 11:01 AM

Hello,

i have a RadRichTextBox (LayoutMode="Flow") and the RadRichTextBoxRibbonUI.

When i change the font/size through a combobox of the ribbon, the RichTextBox does not get the focus back (it stays on the combobox). The cursor in the RichTextBox is not blinking. When i continue typing, it only changes the selection of the combobox and does not insert text in the RichTextBox. Other controls like the buttons are working as expected.

This behavior does not appear when i change the LayoutMode to Paged. Unfortunately i dont need a paged editor. :(

I can easily reproduce this, by taking the "Telerik Editor"-Example from the SDK Samples Browser and changing

 <telerik:RadRichTextBox Name="editor" LayoutMode="Paged" />

to

<telerik:RadRichTextBox Name="editor" LayoutMode="Flow" />

 

I tried to set the focus manually in the selection changed event of the combobox, but this didn't work.

Is there a way to get this working?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Tanya
Telerik team
answered on 27 Apr 2017, 06:22 AM
Hello Jörg,

Thank you for bringing this to our attention.

I was able to reproduce the issue and added it to our backlog. You can subscribe to track its status using the related public item. I added some Telerik points to your account as a token of appreciation for the report.

As a workaround, you can attach to the DropDownClosed event of the combo box and invoke the Focus() method of the presenter. Here is a sample code:

private void comboBoxFontSize_DropDownClosed(object sender, EventArgs e)
{
    (this.radRichTextBox.ActiveEditorPresenter as Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter).Focus();
}

Hope this helps.

Regards,
Tanya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
RichTextBox
Asked by
JF
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or