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

Tab in RadEditor not working

3 Answers 235 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sabby
Top achievements
Rank 1
Sabby asked on 06 Jun 2013, 06:47 PM
Tabs in Rad Editor is not working - it just not focus the next control when it doesn't have anything in content area. 
It works fine when there is content in the content area of RadEditor. Pressing tab moves the focus to the next control and works fine. 
When there is no content, pressing tab just starts adding following row to the 'DescriptionWrapper' table everytime. 
<tr><td class="reWrapper_corner reCorner_bottom_left"> </td><td class="reWrapper_center reCenter_bottom" colspan="3"> </td><td class="reWrapper_corner reCorner_bottom_right"> </td></tr>

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jun 2013, 09:37 AM
Hi,

By default, RadEditor has a shortcut assigned to the Tab key that inserts four &nbsp;'s to simulate Tab indenting. We can avoid this and set focus to next control by using the following code.
JS:
function OnClientLoad(editor, args)
 {
     editor.attachEventHandler("onkeydown", function (e) {
     editor.removeShortCut("InsertTab");
     var viewButtonsHolder = $get(editor.get_id() + "_ModesWrapper");
     var bottomButtons = viewButtonsHolder.getElementsByTagName("A");  //get a reference to all A elements on the toolbar and disable the tabbing trough them
     for (var i = 0; i < bottomButtons.length; i++)
     {
        var buttons = bottomButtons[i];
        buttons .tabIndex = -1;
        buttons .tabStop = false;
     }      
 });
}

Thanks,
Shinu.
0
Sabby
Top achievements
Rank 1
answered on 07 Jun 2013, 04:18 PM
I tried this snippet before but it does not work. As already stated it is only issue when there is no text in the RadEditor. 
>Tab from a control to RadEditor (without text)  ---> works fine
>Tab from RadEditor(without text) to next control ---> highlights (ControlID + '_BottomTable') table.
>Tab again --> Adds Row to _MinutesTextWrapper table (and keeps adding)
0
Stamo Gochev
Telerik team
answered on 11 Jun 2013, 09:33 AM
Hi Sabby,

The behavior you get when clicking the Tab button is browser specific - In Internet Explorer a space is added in order to simulate tabulation while in FireFox the next element is being focused.

We consider handling this scenario in the same way for all the browsers, however, at the moment I cannot provide you with any time bound for the fix, as this is a rather specific case that requires additional research on the matter.

Regards,
Stamo Gochev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Sabby
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sabby
Top achievements
Rank 1
Stamo Gochev
Telerik team
Share this question
or