From 90ab7781adc5322a3099e3f73e4f2fc892663dd7 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Wed, 5 Aug 2026 19:36:22 +0200 Subject: [PATCH] [fix](trx-frontend-http): stop the browser offering saved values for frequency The tuned and centre frequency readouts are text inputs, so the browser keeps what has been typed into them and offers it back in a dropdown -- Edge does this out of the box, dropping stale frequencies from other sessions over the reading. Turn autofill off on both, along with autocorrect and spellcheck, which have no business near a number either. Fixes #39 Signed-off-by: Stan Grams --- .../trx-frontend-http/assets/web/index.html | 4 ++-- .../frontend/tests/browser-smoke.mjs | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index 51aebcbe..3f638c0e 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -209,11 +209,11 @@ SPDX-License-Identifier: GPL-2.0-or-later
Signal strength
- +
Frequency
diff --git a/src/trx-client/trx-frontend/trx-frontend-http/frontend/tests/browser-smoke.mjs b/src/trx-client/trx-frontend/trx-frontend-http/frontend/tests/browser-smoke.mjs index 6b6fcff7..5185be4a 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/frontend/tests/browser-smoke.mjs +++ b/src/trx-client/trx-frontend/trx-frontend-http/frontend/tests/browser-smoke.mjs @@ -376,6 +376,18 @@ try { `text grew without a resize and the strip overlaps by ${unresized.overlap}px`); assert.equal(unresized.iconsOnly, true, "the strip kept its labels with no room for them"); + // The frequency readouts are typed into, so the browser remembers what went + // in and offers it back in a dropdown over the reading — Edge does this by + // default. Nothing here wants to be autofilled from what was tuned last week. + const autofill = await page.evaluate(() => ["freq", "center-freq"].map((id) => { + const input = document.getElementById(id); + return { id, autocomplete: input?.getAttribute("autocomplete") ?? null }; + })); + for (const field of autofill) { + assert.equal(field.autocomplete, "off", + `#${field.id} offers autofill (autocomplete=${field.autocomplete})`); + } + } finally { await browser.close(); await fixture.close();