added handlekeyPress

This commit is contained in:
HB9HIL 2023-11-04 23:05:24 +01:00
parent c9a9ebe7ed
commit 3c1d08f4cb

View File

@ -241,9 +241,14 @@
}
form.submit();
}
function handleKeyPress(event) {
if (event.key === 'Enter') {
submitForm('qso'); // Treat Enter key press as clicking the 'quicksearch-log' button
}
}
</script>
<form id="quicklog-form" class="form-inline">
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Search">
<input class="form-control mr-sm-2" id="nav-bar-search-input" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text_quicklog'); ?>" aria-label="Search" onkeypress="handleKeyPress(event)">
<button title="<?php echo lang('menu_search_button_qicksearch_log'); ?>" class="btn btn-outline-success my-2 my-sm-0" type="button" onclick="submitForm('qso')"><i class="fas fa-plus"></i>
<div class="d-inline d-lg-none" style="padding-left: 10px"><?php echo lang('menu_search_button_qicksearch_log'); ?></div>