TelerikDeveloper.com

TelerikDeveloper.com

Telerik - How to keep the RadEditor Toolbar buttons from getting the focus

body header
Anchor directly to this post BethanyW 8/13/2011 5:37:20 PM
When using the Telerik RadEditor, the toolbar buttons will get the focus as you tab through the form... and there are usually a lot of them. This piece of code will keep that from happening
Anchor directly to this post BethanyW 8/13/2011 5:38:16 PM
<script type="text/javascript">
 function OnClientLoad(editor, args) 
   var buttonsHolder = $get(editor.get_id() + "Top");  
   var buttons = buttonsHolder.getElementsByTagName("A");  
   for (var i=0; i< buttons.length; i++) 
   
      var a = buttons[i]; 
      a.tabIndex = -1; 
      a.tabStop = false
   }  
}
</script>
 <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:Button ID="Button1" runat="server" Text="Button" />
 <telerik:radeditor runat="server" OnClientLoad="OnClientLoad" ID="RadEditor1"></telerik:radeditor>
Unknown or N/A
.NET Development