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:
+10
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user