Page MenuHomePhabricator

Show/hide links on multiple tables of content only toggle the first table, regardless of the number on the page
Closed, InvalidPublic

Description

Author: brian

Description:
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.


Version: 1.6.x
Severity: trivial
URL: http://meta.wikimedia.org/wiki/Help_talk:Section

Details

Reference
bz4219

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:59 PM
bzimport set Reference to bz4219.
bzimport added a subscriber: Unknown Object (MLST).

brian wrote:

An example is at [[Meta:Help talk:Section]].

robchur wrote:

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.

brian wrote:

"I believe"? That makes it sound like a guess. I looked at the JavaScript myself
so I am sure.

lupin.wp wrote:

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.

ayg wrote:

I could swear that wasn't always true.