Ne pas soumettre un inventaire en appuyant sur Entrée
This commit is contained in:
parent
2126224e15
commit
f8a0f364d1
1 changed files with 7 additions and 2 deletions
|
@ -190,6 +190,13 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
// Prevent erroneous enter key confirmations
|
||||
$("input").on("keydown", function(e) {
|
||||
if (e.key === "Enter" && !e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('input[type="submit"]').on("click", function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -207,8 +214,6 @@ $(document).ready(function() {
|
|||
}
|
||||
content += '</ul>'
|
||||
} else {
|
||||
// Prevent erroneous enter key confirmations
|
||||
// Kinda complicated to filter if click or enter key...
|
||||
content="Voulez-vous confirmer l'inventaire ?";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue