"This is not affected by very simple layouts." - sorry this is ambiguous, I meant that simple CSS layouts do not cause a problem with the anchor scrolling position.
Also happens with a recent (2.0b3pre (18.104.22.168pre 2009022319)) build of Camino running under Tiger-PPC (Mac OS X 10.4.11). Have not checked this with Leopard (Mac OS X 10.5.x) or Intel Mac.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090225 Minefield/3.2a1pre I can reproduce this bug 80% of the time. Maybe Firefox isn't taking the stylesheet load into account when deciding whether the page is "done" enough to do the final anchor scroll? It is added by an inline script, so I'd expect it to be taken into account. The testcase is good, but it would be even better if you could make one that uses http://software.hixie.ch/utilities/cgi/test-tools/delayed-file.pl and attach it so we can be sure it doesn't get lost.
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → layout
The anchor scroll happens on parse completion, not onload. You get the same issue with an anchor below some slow-loading images, and we have existing bugs on that...
Apologies if this is a duplicate. I did search for a similar bug before I reported this but I'm not too familiar with the internal workings of FF (such as anchor scroll happening on parse completion).
And I guess the reason this doesn't happen in the non-script case is that the stylesheet load blocks layout?
Will, not a problem. It's not obvious that this is a duplicate by any means, unless you know how the code works! Comment 7 is right.
You need to log in before you can comment on or make changes to this bug.