Page MenuHomePhabricator

Links doesn't work inside collapsible toggles
Closed, ResolvedPublic

Description

If a link is added inside of a collapsible toggle and a user click on it, the target page should be opened. However, in the current implementation of jQuery.makeCollapsible, a click in such links won't open the desired page. Insted, it will expand the hidden element associated to the toggle. See example in the URL above on English Wikibooks and also:
https://secure.wikimedia.org/wikipedia/meta/w/index.php?title=User_talk:Krinkle&oldid=2474984#Collapsible_tables_bugs.3F
https://secure.wikimedia.org/wikipedia/commons/wiki/MediaWiki_talk:CollapsibleTemplates.js#Links_in_header


Version: 1.20.x
Severity: minor
URL: https://secure.wikimedia.org/wikibooks/en/w/index.php?title=Wikibooks:Sandbox&oldid=2076874#Bug:_Links_doesn.27t_work_inside_collapsible_toggles

Details

Reference
bz28344

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:27 PM
bzimport set Reference to bz28344.

Example in the URL field does demonstrate the problem, but talk page problems seem to be fixed.

(In reply to comment #1)

Example in the URL field does demonstrate the problem, but talk page problems
seem to be fixed.

Actually it does. Maybe you've clicked in the link before the scrip was loaded?

If this information is necessary, I'm able to reproduce the problem in both
Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

and
IE 8.0.6001.18702

(In reply to comment #2)

(In reply to comment #1)

Example in the URL field does demonstrate the problem, but talk page problems
seem to be fixed.

Actually it does.

So we agree that wikibooks URL you gave does demonstrate the problem, right?

(In reply to comment #3)

(In reply to comment #2)

(In reply to comment #1)

Example in the URL field does demonstrate the problem, but talk page problems
seem to be fixed.

Actually it does.

So we agree that wikibooks URL you gave does demonstrate the problem, right?

D'oh! My bad. I read "doesn't demonstrate" in the first time... =S

So, we indeed agree on that =)

Created attachment 8667
Proposed patch

The attached patch was tested locally and fixes this bug (clicking outside the link toogles the collapsed content, and clicking on the link opens the target page).

PS: It is the same code which was used to fix the problem on Commons[1].

[1] https://secure.wikimedia.org/wikipedia/commons/w/index.php?diff=45383826&oldid=45265712

Attached: