Don't stop content when location.href is set to an anchor. Bug 233963, r+sr=jst

git-svn-id: svn://10.0.0.236/trunk@156205 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-05-10 20:58:34 +00:00
parent 69de12c5cc
commit 1c3d0e23f4

View File

@@ -486,6 +486,13 @@ LocationImpl::GetHref(nsAString& aHref)
NS_IMETHODIMP
LocationImpl::SetHref(const nsAString& aHref)
{
if (!aHref.IsEmpty() && aHref.First() == PRUnichar('#')) {
// Special-case anchor loads so that we don't stop content
// Note that SetHash (or more precisely nsIURL::SetRef) deals with
// the leading '#'.
return SetHash(aHref);
}
nsAutoString oldHref;
nsresult rv = NS_OK;