From 0191ed7ad6b6aca289d11c4d97c9b7146dbecb6a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 1 Feb 2020 21:48:46 +0100 Subject: [PATCH] abort frequency input on ESC key --- htdocs/lib/FrequencyDisplay.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/lib/FrequencyDisplay.js b/htdocs/lib/FrequencyDisplay.js index fb810c2..5aab3ee 100644 --- a/htdocs/lib/FrequencyDisplay.js +++ b/htdocs/lib/FrequencyDisplay.js @@ -80,6 +80,10 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() { }; me.input.on('blur', submit).on('keyup', function(e){ if (e.keyCode == 13) return submit(); + if (e.keyCode == 27) { + me.input.hide(); + me.displayContainer.show(); + } }); me.input.on('click', function(e){ e.stopPropagation();