From 9038231fee2f8904e55c1f5bb2796757a95589fa Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 15 Oct 2025 20:03:41 -0700 Subject: [PATCH] avoid loading inbox by default/blur input on enter key --- static/index.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/static/index.html b/static/index.html index 63a0380..5f00e52 100644 --- a/static/index.html +++ b/static/index.html @@ -255,12 +255,17 @@ function escapeHtml(text) { window.addEventListener('DOMContentLoaded', () => { const params = new URLSearchParams(location.search); - const query = params.get('q') || 'tag:inbox'; + const query = params.get('q'); document.getElementById('search').value = query; - loadThreads(query); + if (query !== '') { + loadThreads(query); + } document.getElementById('search').addEventListener('keypress', (e) => { - if (e.key === 'Enter') search(); + if (e.key === 'Enter') { + search(); + e.target.blur(); + } }); document.addEventListener('keydown', (e) => {