From 53c2575e7c3db036c932750fb1ca7fa761fe83bc Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 31 Oct 2025 08:31:30 +0000 Subject: [PATCH] Prevent Re-Lookup not only on Reset-Click but also on ESC --- assets/js/sections/qso.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/assets/js/sections/qso.js b/assets/js/sections/qso.js index 016f6c4bb..497d26722 100644 --- a/assets/js/sections/qso.js +++ b/assets/js/sections/qso.js @@ -232,8 +232,19 @@ $("#callsign").on("compositionend", function(e){ $(document).on("keydown", function (e) { if (e.key === "Escape" && $('#callsign').val() != '') { // escape key maps to keycode `27` - // console.log("Escape key pressed"); + preventLookup = true; + + if (lookupCall) { + lookupCall.abort(); + } + reset_fields(); + + // make sure the focusout event is finished before we allow a new lookup + setTimeout(() => { + preventLookup = false; + }, 100); + // console.log("Escape key pressed"); $('#callsign').trigger("focus"); } });