[CLOSED] HTMLEditor "stealing" focus

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] HTMLEditor "stealing" focus

    I am trying to create a form with an HTMLeditor on it and no matter what I set in the config it (the editor) steals focus on page load from the text fields at that are in front of it.

    Any suggestions of how I can set the focus to the text box on the line above the HTMLEditor and then ideally allow the user to "tab" into the Editor.

    <%@ Page Language="C#" %>
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e) {
            if (!X.IsAjaxRequest) {
                this.HtmlEditor1.Text = "<b>Some Initial HTML. You can edit it and submit to server.</b>";
            }
        }
    
    
        protected void Submit(object sender, DirectEventArgs e) {
            X.Msg.Alert("Submit", "The following has been submitted:<br/><br/>" + this.HtmlEditor1.Text).Show();
        }
    </script>
    
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>HtmlEditor - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <h1>HtmlEditor</h1>
            <ext:TextField runat="server" ID="txtEmailSubject" LabelAlign="Right" FieldLabel="Subject"
                AllowBlank="false" AutoFocus="true" TabIndex="1" MaxWidth="790" AutoFitErrors="true"
                BlankText="Please enter a subject" MsgTarget="Side" />
    
    
            <ext:HtmlEditor
                ID="HtmlEditor1"
                runat="server"
                Width="600"
                EnableAlignments="false"
                EnableFontSize="false"
                CreateLinkText="My CreateLinkText">
                <ButtonTips>
                    <BackColor Text="My BackColor Tip" />
                    <Bold Text="My Bold Tip" />
                </ButtonTips>
            </ext:HtmlEditor>
    
    
            <ext:Button runat="server" Text="Submit" OnDirectClick="Submit" />
        </form>
    </body>
    </html>
    Thanks in advance,
    Last edited by Daniil; Jan 30, 2015 at 4:50 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] HtmlEditor.Call("append", "xxx") does not work
    By hdsoso in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 17, 2014, 11:36 PM
  2. HtmlEditor - restrict to use "B" "I" "U" only
    By Nelson in forum 1.x Help
    Replies: 1
    Last Post: Sep 27, 2012, 12:20 PM
  3. [CLOSED] [1.X] HtmlEditor and IE compatibility mode changes "a" tag
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 06, 2012, 12:03 PM
  4. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Tags for this Thread

Posting Permissions