PDA

View Full Version : Problem with new version of Safari


ecairns
2nd January 2008, 02:26 PM
We are having an issue with the Did you Mean in the latest release of Safari. As far as we can tell older versions of Safari and all other browsers work fine. At some point during the page load the new version of Safari pops up the manual spell check dialog box. Here is some abbreviated code of what we are doing, any suggestions:

In the body onload method we are running a function that besides some non-jspell stuff does this:

jspellAutoAttach=false;
jspellInit();

Then jspellPostInit runs this:

var textToCheck


textToCheck= new String(document.mainform.keyword.value);
if (textToCheck != null && textToCheck.length > 0) {
newText=jspellDidYouMean(textToCheck);
if(newText!=textToCheck) {
oldURL = new String('<%=sSpellURL%>');
newURL = oldURL.replace("keyword=","keyword="+newText);
document.getElementById("didyoumean").innerHTML=document.getElementById("didyoumean").innerHTML +
' <a href="' + newURL + '">' + newText + '</a><br>';
document.getElementById("didyoumeantable").style.visibility = "visible";
}
}

<%=sSpellURL%> is a dynamic value set in server side asp, but I don't see how that would have any effect on what we are seeing.

staff
12th February 2008, 12:29 AM
Please test this with the nightly WebKit build http://nightly.webkit.org/ (this is what Safari is based upon). It appears the functionality was broken in this particular release of Safari but it's been fixed in the latest development builds (WebKit).

Thanks!