HtmlEditorExtender is breaking my application position by the code bellow. Some woraround can be made?
/// Wraps ASP.NET's WebForm_OnSubmit in order to encode tags prior to submission
this._editableDiv.focus();
Comments: I put the following javascript on my master page and now it's working. This is the same code as in the function that steals focus, but with the focus-line omitted. It also checks that the required objects are available, i.e. htmleditorextender in use, so it can be put i a master page. if (Sys.Extended && Sys.Extended.UI && Sys.Extended.UI.HtmlEditorExtenderBehavior && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) { Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () { //html encode var char = 3; var sel = null; if (Sys.Browser.agent != Sys.Browser.Firefox) { if (document.selection) { sel = document.selection.createRange(); sel.moveStart('character', char); sel.select(); } else { sel = window.getSelection(); sel.collapse(this._editableDiv.firstChild, char); } } //Encode html tags this._textbox._element.value = this._encodeHtml(); }; }
/// Wraps ASP.NET's WebForm_OnSubmit in order to encode tags prior to submission
this._editableDiv.focus();
Comments: I put the following javascript on my master page and now it's working. This is the same code as in the function that steals focus, but with the focus-line omitted. It also checks that the required objects are available, i.e. htmleditorextender in use, so it can be put i a master page. if (Sys.Extended && Sys.Extended.UI && Sys.Extended.UI.HtmlEditorExtenderBehavior && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) { Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () { //html encode var char = 3; var sel = null; if (Sys.Browser.agent != Sys.Browser.Firefox) { if (document.selection) { sel = document.selection.createRange(); sel.moveStart('character', char); sel.select(); } else { sel = window.getSelection(); sel.collapse(this._editableDiv.firstChild, char); } } //Encode html tags this._textbox._element.value = this._encodeHtml(); }; }