﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32623	Collapsible fieldsets inside inlines do not work	Matthias Kestenholz	nobody	"When using a stacked inline with `fieldsets = [(..., {""classes"": [""collapse""]})]` the expected behavior would be that the Show/Hide functionality works not only in existing inlines but also in inlines which have been dynamically added via the ""add another"" button.

This isn't the case currently. The reason for this is (probably) that the event listener is only attached to `<fieldset class=""module"">` elements existing at page load.

Replacing the code here https://github.com/django/django/blob/45a58c31e64dbfdecab1178b1d00a3803a90ea2d/django/contrib/admin/static/admin/js/collapse.js#L39-L41 with `document.body.addEventListener(""click"", toggleFunc)` _may_ be a sufficient fix but I haven't tested this. This should be relatively easy (famous last words) and I hope it's a good start for someone to start submitting patches to Django :-)"	Bug	closed	contrib.admin	3.2	Normal	worksforme			Unreviewed	0	0	0	0	1	0
