Fix the double reload problem in the editor, which fixes bug 14045 and maybe others.

git-svn-id: svn://10.0.0.236/trunk@47872 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com
1999-09-16 23:54:08 +00:00
parent 40b0f14660
commit 3798e253d3
2 changed files with 22 additions and 10 deletions

View File

@@ -3071,11 +3071,17 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel,
nsIDocumentLoaderObserver * aObserver)
#endif // NECKO
{
#ifdef NECKO
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
#endif
return PrepareDocumentForEditing(aUrl);
// for pages with charsets, this gets called the first time with a
// non-zero status value. Don't prepare the editor that time.
// aStatus will be NS_BINDING_ABORTED then.
if (NS_SUCCEEDED(aStatus))
{
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
return PrepareDocumentForEditing(aUrl);
}
return NS_OK;
}
NS_IMETHODIMP