Thread:Project:Support desk/Links to heading anchors are offset incorrectly when ToC is hidden

For starters, here's the configuration we're running: MediaWiki 1.19.1 PHP 5.3.3 (apache2handler) MySQL 5.1.61

It's an internal wiki for our company, so I unfortunately can't provide a link, but here's the behavior we're seeing: Let's say you create a lengthy page with lots of different headings (using the "= Name of Heading =" syntax). The content of the page itself should be long enough to take up many vertical screens, and the auto-generated table of contents should also be of significant length. Each of these headings becomes an anchor tag that can be linked to using a URL something like this: http://wiki.ourdomain.com/index.php/Name_of_Page#Title_of_Heading

Now browse any page on the wiki long enough to have a table of contents. Click [hide] to hide the table of contents. Now when you click on a link that should take you to a heading within a particular page, you end up at a position in the page where that content *should* be, if the ToC was shown. Unfortunately, when the ToC is of any significant length and hidden, you end up offset from where you should be in the page by the length of the table of contents. For example, let's say your table of contents takes up an entire page (screen, whatever). When you have the ToC hidden and you click on an anchor tag that should take you to a specific heading within this page, you end up one page lower than you should. If the ToC is *not* hidden, you end up exactly where you should.

Is there any way to work around this, or perhaps re-code the ToC rendering code such that it doesn't render and then collapse (which is what it seems to be doing) when you have it hidden?

Thanks, Ethan