HomePhabricator

jquery.makeCollapsible: Make it possible to clone a collapsible

Authored by Schnark.

Description

jquery.makeCollapsible: Make it possible to clone a collapsible

Currently collapsible elements are no longer collapsible after you
cloned them and made them collapsible again, e.g. via

$clone = $('#bodyContent').clone();
mw.hook('wikipage.content').fire($clone);
$('#bodyContent').replaceWith($clone);

This patch fixes this by ignoring the linksPassthru option on links
with href="#".

Bug: T71288
Change-Id: I954483f3e26f46172ec2374a3717f37dd309ca57

Event Timeline

[[mw:User:Schnark]] <gerritpatchuploader@gmail.com> committed rMW6bab937dc76a: jquery.makeCollapsible: Make it possible to clone a collapsible (authored by Schnark).Jul 15 2015, 9:11 AM