Jan 28, 2015, 4:44 PM
[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.
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]