Version: (using KDE KDE 3.5.5) Installed from: Ubuntu Packages OS: Linux How to reproduce: 1. Click on a link pointing to an anchor on the same page 2. Click on another link pointing to a different anchor on the same page 2. Click Back Result: - The URL in the location bar is updated correctly (shows the first fragment identifier) and the page also returns to the previous state. - Window.location and document.location still contain the URL with the second fragment identifier instead of the first 4. Click Back Result: - The URL in the location bar is updated correctly (shows second fragment identifier) and the page also returns to the previous state. - Window.location and document.location contain the URL with the first fragment identifier instead of the original URL Expected behavior: window.location and document.location are correctly updated and match the URL in the location bar after clicking Back
Created attachment 18495 [details] Test page
Nice test case. Confirmed this behaviour on KDE 3.5.5 / Kubuntu 6.10.
Confirmed in Konqueror 4.0.3/Kubuntu... and once again, nice test case ;).
Retitling to make it easier to notice when looking for bugs in this area..
SVN commit 825638 by orlovich: Fix a number of issues related to redirections: - Strip leading # if given to location.hash, as other browsers do (part of #159192); avoids doubling it with various history frameworks, and stops confusing facebook's photo view (#165221) - Properly handle in-place redirects such as anchor jumps completely synchronously (part of #159192) - More importantly, don't handle in-place redirects as changing pages, which aborts parsing. Fixes some Wikipedia pages showing up blank. - Properly update history on anchor jumps, including honoring locking (#159279, #137176) Also, cleanup some of the handling of JavaScript URLs --- use the helpers I needed for above and not 10 different copies of string munging. BUG:165221 BUG:159192 BUG:159279 BUG:137176 M +14 -15 ecma/kjs_window.cpp M +72 -38 khtml_part.cpp M +23 -1 khtmlpart_p.h WebSVN link: http://websvn.kde.org/?view=rev&revision=825638