Bug 653741 - You should be able to scoll back to the current anchor by focusing the location bar and pressing <enter>. r=bz

This commit is contained in:
Justin Lebar
2011-05-09 17:59:16 -04:00
parent e07d632de4
commit 61acd1d818
4 changed files with 69 additions and 2 deletions

View File

@@ -8300,8 +8300,10 @@ nsDocShell::InternalLoad(nsIURI * aURI,
GetCurScrollPos(ScrollOrientation_X, &cx);
GetCurScrollPos(ScrollOrientation_Y, &cy);
// We scroll the window precisely when we fire a hashchange event.
if (doHashchange) {
// We scroll whenever we're not doing a history load. Note that
// sometimes we might scroll even if we don't fire a hashchange
// event! See bug 653741.
if (!aSHEntry) {
// Take the '#' off the hashes before passing them to
// ScrollToAnchor.
nsDependentCSubstring curHashName(curHash, 1);