Fix enter key not closing/submitting modals

This commit is contained in:
Skylar Ittner 2021-07-23 21:37:34 -06:00
parent 0486e3bcf6
commit f0f768b089

View File

@ -255,8 +255,10 @@ $("#passwordModal").on("shown.bs.modal", function () {
$("#passwordModalInput").focus();
});
$(".modal.show").on("keydown", function (e) {
$(".modal").on("keydown", function (e) {
if (e.keyCode == 13) {
// Prevent overlapping modals from all getting clicked
e.stopPropagation();
$(this).find(".btn-default").first().click();
}
});