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 :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/32623>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => worksforme
Comment:
Thanks for the report, however it works for me (see also #30459 and a test
added in e286987a27271c8ee7eb6e4d4332b563c4e6094b).
--
Ticket URL: <https://code.djangoproject.com/ticket/32623#comment:1>
Comment (by Matthias Kestenholz):
Oh no, you're right. Sorry for not checking two or three times before
submitting this report!
--
Ticket URL: <https://code.djangoproject.com/ticket/32623#comment:2>