To reproduce go to any page with collapsible content, e.g. https://en.wikipedia.org/wiki/Help:Table#Using_class_mw-collapsible
Execute in the console:
$clone = $('#bodyContent').clone();
mw.hook('wikipage.content').fire($clone);
$('#bodyContent').replaceWith($clone);
The collapsible content is now no longer collapsible (but at least sortable tables are still sortable). Note that it doesn't work with the following code, either (and this breaks sortable tables, too: bug 38704):
$clone = $('#bodyContent').clone(true);
$('#bodyContent').replaceWith($clone);
What I'm currently doing (in a script that shows footnotes in a popup and should be able to show collapsible and sortable tables as such) is an additional $clone.find('.mw-collapsible-toggle').remove(); between the first and second line, but this is more a hack than a solution:
$clone = $('#bodyContent').clone();
$clone.find('.mw-collapsible-toggle').remove();
mw.hook('wikipage.content').fire($clone);
$('#bodyContent').replaceWith($clone);
This is probably easily fixable: The cloned handles are recognized as such, but when the user clicks on them the content isn't collapsed/expanded, because they are links. If the pass-through behavior wasn't applied to links with href="#", the cloned contents will probably be collapsible without hacks.
Version: 1.24rc
Severity: normal