Using as an example of starting the April 30 version 4.1.7.0429 version AjaxControlToolkitSampleSite.zip shifting the focus on the textbox the page is not erased the mask, the result is visible in the attached figure.
Comments: hello everybody, I suffered the same issue. To work around this I have implemented a custom ToolkitScriptManager that basically add a JS to Fix this problema. This is my custom class: ``` Public Class ToolkitScriptManagerCustom Inherits ToolkitScriptManager Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs) MyBase.OnPreRender(e) Dim sb As New StringBuilder sb.AppendLine("<script>") sb.AppendLine("function FixMaskedEditExtender() {") sb.AppendLine("if (!Sys) return;") sb.AppendLine("if (!Sys.Application) return;") sb.AppendLine("var els = Sys.Application.getComponents();") sb.AppendLine("if (!els) return;") sb.AppendLine("for (i = 0; i < els.length; i++) {") sb.AppendLine(" if (els[i]._name == ""MaskedEditBehavior"") {") sb.AppendLine(" var mk = els[i];") sb.AppendLine(" var el = mk._element;") sb.AppendLine(" if ($) {") sb.AppendLine(" $(el).blur(function(event) { $(this).val($(this).val().replace(new RegExp(mk._PromptChar, ""g""), '')); });") sb.AppendLine(" } else {") sb.AppendLine(" el.setAttribute(""onblur"", ""this.value = this.value.replace(new RegExp("" + mk._PromptChar + "", 'g'),'');"");") sb.AppendLine(" }") sb.AppendLine(" }") sb.AppendLine("}") sb.AppendLine("}") sb.AppendLine("Sys.Application.add_load(FixMaskedEditExtender);") sb.AppendLine("</script>") Dim l As New LiteralControl(sb.ToString()) Me.Controls.Add(l) End Sub End Class ``` I hope this can help somebody
Comments: hello everybody, I suffered the same issue. To work around this I have implemented a custom ToolkitScriptManager that basically add a JS to Fix this problema. This is my custom class: ``` Public Class ToolkitScriptManagerCustom Inherits ToolkitScriptManager Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs) MyBase.OnPreRender(e) Dim sb As New StringBuilder sb.AppendLine("<script>") sb.AppendLine("function FixMaskedEditExtender() {") sb.AppendLine("if (!Sys) return;") sb.AppendLine("if (!Sys.Application) return;") sb.AppendLine("var els = Sys.Application.getComponents();") sb.AppendLine("if (!els) return;") sb.AppendLine("for (i = 0; i < els.length; i++) {") sb.AppendLine(" if (els[i]._name == ""MaskedEditBehavior"") {") sb.AppendLine(" var mk = els[i];") sb.AppendLine(" var el = mk._element;") sb.AppendLine(" if ($) {") sb.AppendLine(" $(el).blur(function(event) { $(this).val($(this).val().replace(new RegExp(mk._PromptChar, ""g""), '')); });") sb.AppendLine(" } else {") sb.AppendLine(" el.setAttribute(""onblur"", ""this.value = this.value.replace(new RegExp("" + mk._PromptChar + "", 'g'),'');"");") sb.AppendLine(" }") sb.AppendLine(" }") sb.AppendLine("}") sb.AppendLine("}") sb.AppendLine("Sys.Application.add_load(FixMaskedEditExtender);") sb.AppendLine("</script>") Dim l As New LiteralControl(sb.ToString()) Me.Controls.Add(l) End Sub End Class ``` I hope this can help somebody