Collapsing dropdown after clicking into RadEditor

2 posts, 1 answers
  1. Peter
    Peter avatar
    95 posts
    Member since:
    Mar 2009

    Posted 18 Mar 2010 Link to this post


    I have a RadToolbar and a RadEditor on the same page. The toolbar has a dropdown in it. If I click on the dropdown button and the dropdown displays, and then click directly into the RadEditor, the dropdown remains open instead of automatically collapsing. Is there any way to force it to collapse?
  2. Answer
    Yana avatar
    4603 posts

    Posted 23 Mar 2010 Link to this post

    Hi Peter,

    You should subscribe to OnClientLoad event of the editor and in its handler:

    <script type="text/javascript">
           function OnClientLoad(editor, args) {
               var element = document.all ? editor.get_document().body : editor.get_document();
               $telerik.addExternalHandler(element, "click", function() {
                   var toolBar = $find("<%=toolBar1.ClientID %>");
                   for (var i = 0; i < toolBar.get_items().get_count(); i++) {
                       var item = toolBar.get_items().getItem(i);
                       if (item._isDropDownVisible == true)

    I've attached a simple page demonstrating this approach.

    Sincerely yours,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top