Fix Builder layout and Loading... initialization bug

Layout: replace admin-container wrapper with #builder-page flex column;
add min-height:0 to builder-wrap, builder-body, both panels so the
inner scroll areas actually shrink correctly in a flex column.

Loading...: scripts at end of body mean DOMContentLoaded may have
already fired by the time the listener is registered. Check
document.readyState first and call init() directly if DOM is ready.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 19:26:26 -07:00
parent 21e856f250
commit b894e22bdc
3 changed files with 27 additions and 7 deletions
+10 -2
View File
@@ -17,7 +17,7 @@
/* ─────────────────────────────────────────────────────────
Boot
───────────────────────────────────────────────────────── */
document.addEventListener('DOMContentLoaded', function () {
function init() {
PRAYERS = window.PRAYERS_DATA || [];
// Populate existing steps when editing a session
@@ -31,7 +31,15 @@
renderLibrary();
renderSequence();
bindEvents();
});
}
// Scripts are at end of body — DOM is fully parsed by the time this runs,
// so DOMContentLoaded may have already fired. Check readyState first.
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
/* ─────────────────────────────────────────────────────────
Event bindings