Skip to content

Fix: dashboard Customize button inert (modal built before Bootstrap loaded)#6

Merged
WebTigers merged 2 commits into
mainfrom
fix/dashboard-customize-modal-timing
Jul 17, 2026
Merged

Fix: dashboard Customize button inert (modal built before Bootstrap loaded)#6
WebTigers merged 2 commits into
mainfrom
fix/dashboard-customize-modal-timing

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

The dashboard's inline script runs at parse time (content = layout line 69), but bootstrap.bundle.js loads in the footer (line 82). So new bootstrap.Modal() ran against an undefined window.bootstrap → modal null → click handler never attached (it was guarded on modal). Now the modal is created lazily on first click and the handler attaches unconditionally — the same effective timing every other admin modal gets from DOMContentLoaded.

Verified: php lint + JS syntax clean. (The interactive behavior is still browser-only / outside smoke.)

🤖 Generated with Claude Code

WebTigers and others added 2 commits July 17, 2026 05:09
…tstrap loaded)

The dashboard's inline script runs at parse time (content is at layout line 69),
but bootstrap.bundle.js loads in the footer (line 82) — so `new bootstrap.Modal()`
ran against an undefined window.bootstrap, modal stayed null, and the click
handler was never attached (guarded on `modal`). Create the modal lazily on first
click instead, and attach the handler unconditionally. Matches the DOMContentLoaded
pattern every other admin modal uses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WebTigers
WebTigers merged commit 1cb3f4d into main Jul 17, 2026
5 checks passed
@WebTigers
WebTigers deleted the fix/dashboard-customize-modal-timing branch July 17, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant