зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
e8714aaa82
Коммит
264ad311ba
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче