diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index da457dc61e6..1eb7e77807e 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -4344,7 +4344,9 @@ HTMLContentSink::ScrollToRef(PRBool aReallyScroll) mDocument->GetShellAt(i, getter_AddRefs(shell)); if (shell) { // Scroll to the anchor - shell->FlushPendingNotifications(PR_FALSE); + if (aReallyScroll) { + shell->FlushPendingNotifications(PR_FALSE); + } // Check an empty string which might be caused by the UTF-8 conversion if (!ref.IsEmpty()) { diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp index ebdc62cf1e2..0ec11a8835e 100644 --- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp @@ -352,7 +352,9 @@ nsXMLContentSink::ScrollToRef(PRBool aReallyScroll) mDocument->GetShellAt(i, getter_AddRefs(shell)); if (shell) { // Scroll to the anchor - shell->FlushPendingNotifications(PR_FALSE); + if (aReallyScroll) { + shell->FlushPendingNotifications(PR_FALSE); + } // Check an empty string which might be caused by the UTF-8 conversion if (!ref.IsEmpty())