Fix modal visibility using CSS class instead of HTML hidden attribute

Replace hidden attribute + [hidden] CSS selector with a .modal-open
class toggle. The hidden attribute approach was unreliable because
CSS display:flex was winning the specificity battle. Class-based
show/hide is explicit and not subject to attribute/cascade conflicts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 21:06:03 -07:00
parent d4507ef4e2
commit 3c11fd2067
3 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -257,12 +257,12 @@
updateModalFields();
updateAttrRadioStyles();
modal.hidden = false;
modal.classList.add('modal-open');
document.getElementById('modal-name').focus();
}
function closeModal() {
document.getElementById('prayer-modal').hidden = true;
document.getElementById('prayer-modal').classList.remove('modal-open');
editingPrayerId = null;
}