After downloading and installing the latest version of Ultimate Editor and Ultimate Spell, I created a new test web application. I added version 3.3 of UE and US to the web References, and copied the include directory to the project.
I created one page that has a text box control and a submit button only. Here is the source of the page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWeb._Default" %>
<%@ Register Assembly="UltimateSpell" Namespace="Karamasoft.WebControls.UltimateSpell"
TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function spellChecker()
{ var bHasSpellingErrors = false;
for (var oKey in UltimateSpellAsYouTypes)
{ if (UltimateSpellAsYouTypes[oKey].HasSpellingErrors() == true)
{ bHasSpellingErrors = true;
break;
}
}
if (bHasSpellingErrors)
{ if (window.confirm('There are spelling errors on this page. Would you still like to continue?') == true) return true;
else
return false;
}
else
return true;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtField" runat="server" Width="200px" TabIndex="1" Style="position: relative;z-index:1" MaxLength="100"></asp:TextBox>
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
onclick="btnSubmit_Click" />
<cc1:UltimateSpell ID="ctlSpellChecker" runat="server" AutoCorrect="True" EnableViewState="true"
ControlIdsToCheck="txtField"
IgnoreWordsInUpperCase="False" ShowModal="True" ShowOptions="True" ShowSpellButton="False"
SpellAsYouType="True" CustomDictionary="MyCustomDictionary">
<MisspelledWordStyle Font-Bold="True" ForeColor="#FF0000"></MisspelledWordStyle>
<SpellButton ButtonType="Button" Text="Spell Check" CausesValidation="True" ImageUrl=""
ImageAlign="AbsMiddle"></SpellButton>
</cc1:UltimateSpell>
</div>
</form>
</body>
</html>
Here is the code behind:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace TestWeb
{ public partial class _Default : System.Web.UI.Page
{ protected void Page_Load(object sender, EventArgs e)
{ btnSubmit.Attributes.Add("onclick", "return spellChecker();"); }
protected void btnSubmit_Click(object sender, EventArgs e)
{
}
}
}
When I run the page, I type som baad text in the text box, then right click on som and select sum from the list. Then I right-click on baad and select bad from the list. Then I click the Submit button to fire the javascript. At this point HasSpellingErrors returns true. If I look at the text in the debugger using the GetSpellText() method, the text contains the corrected words.
Therefore, this problem still exists in the latest version.