From b4885c4a4f144da3033eea00624540007d11f8ce Mon Sep 17 00:00:00 2001 From: HikeMap User Date: Wed, 31 Dec 2025 23:04:39 -0600 Subject: [PATCH] Add inline onclick handler as fallback for admin close button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added console logging for debugging - Increased timeout to 100ms to ensure DOM is ready - Added preventDefault and stopPropagation - Included inline onclick as fallback method 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index bc1337f..ec60ae1 100644 --- a/index.html +++ b/index.html @@ -5907,7 +5907,11 @@ setTimeout(() => { const adminCloseBtn = document.getElementById('adminCloseBtn'); if (adminCloseBtn) { - adminCloseBtn.addEventListener('click', () => { + console.log('Admin close button found, attaching listener'); + adminCloseBtn.addEventListener('click', (e) => { + console.log('Admin close button clicked'); + e.preventDefault(); + e.stopPropagation(); const adminOverlay = document.querySelector('.admin-panel-overlay'); if (adminOverlay) { adminOverlay.classList.remove('active'); @@ -5917,8 +5921,10 @@ // Switch back to edit tab switchTab('edit'); }); + } else { + console.error('Admin close button not found!'); } - }, 0); + }, 100); // Password dialog document.getElementById('passwordSubmit').addEventListener('click', checkPassword); @@ -6334,7 +6340,7 @@

⚙️ Admin Settings

- +