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

Toolbars not working after set_visible(true)

1 Answer 44 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Peterson
Top achievements
Rank 1
Peterson asked on 03 Jan 2009, 07:21 PM
Hello all,

I have a question I can hope you all can answer quick.  I am new to the AJAX controls and as a first app, I've created a little Site Map application.  It has a RadAjaxPanel, a RadSplitter, some RadPanes, etc.  In the left pane I have a RadTreeview.  Onnodeclick, it does an AJAX postback and populates a RadEditor in the right pane, which that page's content.  It's really simple and has allowed me to get familiar with some new controls.

This all works perfect in IE.  But I noticed that in Firefox, after you clicked the first node (causing the AJAX postback) the RadEditor would stop being clickable.  I remembered this issue from long ago, so I looked up the latest syntax to call the set_visible() method.  I implemented the following:

<script type="text/javascript"
    Sys.Application.add_load(function() { 
        var editor = $find("<%=RadEditor1.ClientID%>"); 
        editor.set_visible(true); 
        } 
    ); 
</script> 

Now it works great.  I can click in the editor and edit content.  BUT, the toolbars still do not work.  When I click them, nothing happens, and if I set the ToolbarMode to ShowOnFocus, it never comes up again after the first treeview node click.

Is there something I am missing, or need to do to re-enable the toolbar?

Thanks

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 06 Jan 2009, 02:13 PM
Hello Tyson,

There are various optimizations implemented into the editor to reduce the time it takes for a page to load - especially when there are many editor instances. One such optimization is that when an editor is originally invisible on the page it would not perform any initialization (which greatly speeds up scenarios where there are many editors in invisible multipages, etc).

While the editor tries to detect its becoming visible, in some more complex scenario this is not always detected (e.g. like in this case when it works OK in IE, but not i FF).

By the way, I believe you do some moving around of the editor in the DOM or use something else - because it seems to be that the scenario you describe *should have worked* out-of-the-box.

Nonetheless, my suggestion is to try adding the following code: editor.raiseEvent("editReady");

Let us know how thing go.

Best wishes,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Peterson
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or