-
Notifications
You must be signed in to change notification settings - Fork 308
Open
Description
Describe the bug
Inline tabs on the change-form do not open on the first click; the pane only becomes visible after a full page refresh or “Save and continue editing”.
Steps to reproduce
- Install django-jazzmin ≥ 2.6.2.
- Set
changeform_formatto"vertical_tabs"(or"horizontal_tabs"). - Open the change-form for any model with inlines.
- Click any tab other than the first.
- Observe: nothing happens until you refresh or re-submit.
Expected behavior
The corresponding inline pane should open immediately on the first click.
Root cause
Bootstrap tab initialisation runs before all inline markup has been injected by Django, so the click handler is never attached.
Suggested fix
Add a deferred Bootstrap tab initialisation in change_form.html:
document.addEventListener('DOMContentLoaded', () => {
if (window.jQuery && window.jQuery.fn.tab) {
$('a[data-toggle="pill"], a[data-bs-toggle="pill"]').tab('show');
}
});Metadata
Metadata
Assignees
Labels
No labels