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

Prevent RadEditor from scrolling to the bottom

3 Answers 132 Views
Editor
This is a migrated thread and some comments may be shown as answers.
rodusa
Top achievements
Rank 1
rodusa asked on 04 Mar 2009, 05:05 AM
I have a very large page that requires to manually scroll down to see its content. The problem arises whenever I place a RadEditor control on my page. For some reason, on the first load and on any post back  RadEditor is making the page scroll to the bottom but once I remove the control the page works fine. PS: RadEditor it is not taking focus, simply making the page scroll down to the bottom. 

Rod

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Mar 2009, 03:49 PM
Hi Rodusa,

What the editor actually do is similar to (but not exactly the same as) getting the focus. The editor just gets the page selection in order to attach its event handlers properly.

Here is an example how to set the focus on a textbox control for example placed at the beginning of the page:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<telerik:radeditor runat="server" OnClientLoad="OnClientLoad" ID="RadEditor1"></telerik:radeditor>
<script type="text/javascript">
function OnClientLoad(editor, args)
{
    setTimeout(function()
    {
        $get("TextBox1").focus();
    }, 100);
}
</script>



Regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
rodusa
Top achievements
Rank 1
answered on 06 Mar 2009, 04:35 PM
thanks but this solution will cause the page to flicker as it jumps from the editor to the textbox.

Rod
0
Rumen
Telerik team
answered on 09 Mar 2009, 08:21 AM
Hi Rod,

As I explained in my first reply the behavior is due to that the RadEditor control gets the page selection in order to attach its event handlers properly in Internet Explorer.  This behavior is seriously enhanced in the recent versions of RadEditor and my suggestion is to make sure that you are not using an older version than 6 months. The best option is to use the latest one 2008.3 1314.

If you would like we can tell you how to override the editor's method (in the latest versions of RadEditor) that will solve completely the page jump problem, but you can experience problems in IE.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
rodusa
Top achievements
Rank 1
Answers by
Rumen
Telerik team
rodusa
Top achievements
Rank 1
Share this question
or