abort frequency input on ESC key

This commit is contained in:
Jakob Ketterl 2020-02-01 21:48:46 +01:00
parent 8036758857
commit 0191ed7ad6

View File

@ -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();