Last modified: 2007-05-20 17:09:40 UTC
All the toggle links appear on the first TOC. Clicking any of the "hide" links hides the first TOC and changes the first link to "show". After that, clicking any of the links shows the first TOC and changes the first link to "hide". The JavaScript just grabs the first TOC and the first toggle link; no provision is made for multiple TOCs.
An example is at [[Meta:Help talk:Section]].
This bug report should have read... When viewing a page with multiple tables of content, for instance the test case URL provided, the show/hide links on each table of contents only affect the first table, regardless of which link was clicked. I believe that the JavaScript deals with the first table of contents and the first toggle link, and no provision is made for multiple tables of content. ...it actually explains the problem in better detail. When I first read this report and the summary, I didn't know what it was about. Please remember this in future.
"I believe"? That makes it sound like a guess. I looked at the JavaScript myself so I am sure.
Are multiple TOCs ever useful? If not, this bug doesn't seems worth fixing to me.
We only allow one TOC to be shown. The toc will be placed before the first heading or at the first '__TOC__' marker found.
I could swear that wasn't always true.