diff --git a/static/index.html b/static/index.html index c4ed0eb..bc620a7 100644 --- a/static/index.html +++ b/static/index.html @@ -2477,6 +2477,8 @@ // DRAWER // ========================================================================= function openDrawer() { + // Don't open drawer when login overlay is showing + if (!document.getElementById('loginOverlay').classList.contains('hidden')) return; document.getElementById('drawer').classList.add('open'); document.getElementById('drawerOverlay').classList.add('open'); // Highlight current tab in drawer @@ -2929,6 +2931,14 @@ } function handleCameraError(e) { + // Stop scanning so ZXing doesn't fire more callbacks that re-create the + // fallback UI in a loop — each re-create re-focuses the input, causing + // the mobile keyboard to pop repeatedly. + scanningActive = false; + if (codeReader) { + try { codeReader.reset(); } catch (_) { /* ignore */ } + codeReader = null; + } setScanStatus('Camera failed: ' + e.message, 'error'); const ph = document.getElementById('cameraPlaceholder'); if (ph) {