Skip to content

Commit 4b9ab1c

Browse files
committed
Disable double click on form submit button, because some people out there still do it
1 parent b820c15 commit 4b9ab1c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

resources/assets/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const Swal = require('sweetalert2')
1616
const appJquery = function() {
1717
return {
1818
init: function () {
19+
$('form button[type="submit"]').on('click', function(event) {
20+
setTimeout(function () {
21+
event.target.disabled = true;
22+
}, 0);
23+
});
1924

2025
$.ajaxSetup({
2126
headers: {

0 commit comments

Comments
 (0)