Added test for postdata before invoking the anchor scrolling code to prevent obscure form problem where the submit url is the same as the current url with an anchor appended. b=52290

git-svn-id: svn://10.0.0.236/trunk@79108 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
locka%iol.ie
2000-09-14 09:45:14 +00:00
parent 688ab7f97f
commit d6704f0876

View File

@@ -2768,10 +2768,10 @@ NS_IMETHODIMP nsDocShell::InternalLoad(nsIURI* aURI, nsIURI* aReferrer,
{
mURIResultedInDocument = PR_FALSE; // reset the clock...
// Check to see if the new URI is an anchor in the existing document.
if (aLoadType == nsIDocShellLoadInfo::loadNormal ||
aLoadType == nsIDocShellLoadInfo::loadNormalReplace ||
aLoadType == nsIDocShellLoadInfo::loadHistory ||
aLoadType == nsIDocShellLoadInfo::loadLink)
if ((aLoadType == nsIDocShellLoadInfo::loadNormal ||
aLoadType == nsIDocShellLoadInfo::loadNormalReplace ||
aLoadType == nsIDocShellLoadInfo::loadHistory ||
aLoadType == nsIDocShellLoadInfo::loadLink) && (aPostData == nsnull))
{
PRBool wasAnchor = PR_FALSE;
NS_ENSURE_SUCCESS(ScrollIfAnchor(aURI, &wasAnchor), NS_ERROR_FAILURE);