Welcome Guest Search | Active Topics | Sign In | Register

How to set focus to the content area of Editor Options
Duane
Posted: Tuesday, December 8, 2009 10:07:12 AM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Hello,

Some of our users have reported that when they load a page with the editor, if they press the backspace button, the page navigates back to the previous page. This seems to happen in all browsers except IE . If you click in the design area of the editor, it does not navigate back.

I know this is a common issue with other pages as well regardless of the controls on the page. Is is possible to set focus to the content / design area of the editor using script or a property setting?

Thanks
eo_support
Posted: Tuesday, December 8, 2009 11:59:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can handle the Editor's ClientSideOnLoad event and then call focus() on the client side editor object.

Thanks
Duane
Posted: Tuesday, December 8, 2009 2:20:41 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
I've set the ClientSideOnLoad property but the function is not being called. I have the editor in a dialog, is that interfering with the editor somehow? I set a breakpoint on the javascript function, but it never gets called.

Code: JavaScript
function setEditorFocus() {
            var editor = eo_GeObject("Editor1");
            editor.focus();
        }


Code: HTML/ASPX
<eo:Editor  ID="Editor1"  
                    ToolBarSet="Custom"
                    ToolBarItems="Copy,Cut,Paste,PasteAsText,ClearFormat,ClearWordFormat,Undo,Redo, InsertOrEditImage,InsertOrEditLink,RemoveLink,NumberedList,BulletList,Indent,Outdent,AlignLeft, AlignCenter,AlignJustify,AlignRight;Fonts,FontSizes,ForeColor,Bold,Underline,Italic,InsertLine,Find,SpellCheck"
                    runat="server" 
                    Width="650px"
                    Height="380px"                
                    BackColor="White" 
                    BorderColor="#DDDDDD"
                    BorderStyle="Solid" 
                    BorderWidth="1px"
                    Html=""
                    ColorPickerID="ColorPicker1"
                    SpellCheckerID="SpellChecker1"
                    FileExplorerDialogID="FileExplorerDialog1"
                    FileExplorerUrl="FileExplorer.aspx"
                    ClientSideOnLoad="setEditorFocus">
eo_support
Posted: Tuesday, December 8, 2009 3:10:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine to us. Can you provide a full test page?

Thanks
Duane
Posted: Tuesday, December 15, 2009 3:53:58 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Hello,
I haven't seen any response on this issue yet, or to the PM I sent with the site/location to reproduce this condition. Can you update me on this issue.

FYI, the editor in .41 build is working much better in our supported browsers.

Thnanks
eo_support
Posted: Tuesday, December 15, 2009 4:04:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You are welcome and sorry about the delays. Is it possible for you to isolate the problem into a test page/project first? Without being able to run it here in our environment it is much harder and sometimes near impossible to pinpoint the root cause.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.