Closed Bug 233963 Opened 17 years ago Closed 17 years ago
.href="#foo" causes window contents to fail to appear .
nsLocation::SetHref calls Stop() (with STOP_CONTENT). I assume that's needed for cases when we actually plan to load a new URI? But in this case, we just stop the content and then do a scroll, which means we show no content...
Assignee: general → general
OS: Windows 2000 → All
QA Contact: pschwartau → ian
Hardware: PC → All
*** Bug 242913 has been marked as a duplicate of this bug. ***
OK, it looks like the code in bug 37434 did some content-stopping inside docshell, presumably _after_ we'd tried scrolling. Then it was converted to unconditional Stop() calls. Bug 114975 fixed setting location.hash, but location.href still stops content.
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → mozilla1.8alpha
Comment on attachment 148028 [details] [diff] [review] Special-case location.href='#foo' The other options would be to move the stopping back down into docshell or to have code here that tries to figure out whether we just plan to scroll (duplicating code in docshell). Both of those solutions would work for all scrolling cases, thought, whereas this just fixes this special case.... I really wish we had better ways of comparing two URIs. :(
Comment on attachment 148028 [details] [diff] [review] Special-case location.href='#foo' + // Special-case anchor loads so that we don't stop content + nsAString::const_iterator start, end; + aHref.BeginReading(start); + aHref.EndReading(end); + ++start; nsStandardURL::SetRef() already does this, so you don't need to duplicate this code here. r+sr=jst
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.