From 8f44bb451e86c9171424bd28dd912c0f22eca8ff Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Fri, 12 Jul 2002 21:15:51 +0000 Subject: [PATCH] Fix for bug # 124245. javascript onload redirect breaks back button. r= rpotts sr=alecf, a=roc+moz git-svn-id: svn://10.0.0.236/trunk@125122 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 099b57f544a..9cf753e8eab 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -613,6 +613,17 @@ nsDocShell::LoadURI(nsIURI * aURI, } } // parent } //parentDS + else { // This is the root docshell + PRUint32 selfBusy = BUSY_FLAGS_NONE; + GetBusyFlags(&selfBusy); + // If we are still busy loading the previous page, then this load was + // probably initiated by a onLoadhandler. Let the new page replace + // previous one. + if (mLSHE && (selfBusy & BUSY_FLAGS_BUSY)) { + loadType = LOAD_NORMAL_REPLACE; + } + + } } // !shEntry if (shEntry) {