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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user