From 381ff6f7b2b71aac4651c1ce905586f7b2d3d31d Mon Sep 17 00:00:00 2001 From: Daniel Onyejesi Date: Sun, 22 Mar 2026 12:18:29 -0400 Subject: [PATCH] Fix: clear password fields after autofill delay and add autocomplete=off on login form --- docker-compose.yml | 2 +- public/index.html | 2 +- public/js/auth.js | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ada6baf..6df0bc8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: pediatric-scribe: - image: danielonyejesi/pediatric-ai-scribe-v3:v1.7 + image: danielonyejesi/pediatric-ai-scribe-v3:v1.8 ports: - "3552:3000" env_file: diff --git a/public/index.html b/public/index.html index b2a69ba..2b48afa 100644 --- a/public/index.html +++ b/public/index.html @@ -28,7 +28,7 @@ -
+

Sign In

diff --git a/public/js/auth.js b/public/js/auth.js index 0b399a1..bfbf163 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -97,20 +97,20 @@ document.addEventListener('DOMContentLoaded', function() { function exitApp() { clearSession(); - // Remove has-session class so auth screen CSS override is lifted document.documentElement.classList.remove('has-session'); - // Clear all auth input fields - ['login-email', 'login-password', 'reg-name', 'reg-email', 'reg-password', 'login-totp'].forEach(function(id) { - var el = document.getElementById(id); - if (el) el.value = ''; - }); - // Clear URL hash history.replaceState(null, '', window.location.pathname); if (authScreen) authScreen.style.display = 'flex'; if (mainApp) mainApp.style.display = 'none'; var adminTabBtn = document.getElementById('admin-tab-btn'); if (adminTabBtn) adminTabBtn.classList.add('hidden'); showLoginForm(); + // Clear fields after browser autofill has had a chance to run + setTimeout(function() { + ['login-email', 'login-password', 'reg-name', 'reg-email', 'reg-password', 'login-totp'].forEach(function(id) { + var el = document.getElementById(id); + if (el) el.value = ''; + }); + }, 100); } function clearSession() {