Enable Enter-Press for submit in modals.

This commit is contained in:
MaxJa4
2024-01-23 09:33:56 +01:00
parent 1a7d6cbe11
commit 2139b83174
7 changed files with 50 additions and 7 deletions

View File

@@ -149,6 +149,12 @@
});
});
editClanModal.addEventListener('keypress', event => {
if (event.key === 'Enter') {
submitButton.click();
}
});
editClanModal.addEventListener('hidden.bs.modal', _ => {
submitButton.removeEventListener('click', submitClanHandler);