Skip to content

Commit 240019c

Browse files
committed
Merge branch 'develop'
2 parents 6f83723 + 8afc67f commit 240019c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

themes/loop/scripts/form.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
$(function () {
33
// Disable all submit buttons on submit to prevent multiple
44
// submits.
5-
// Using the "submit" event on the form is too slow (late), so we
6-
// use the "click" event on the button itself.
7-
$('form [type="submit"]').on('click', function() {
8-
$(this).closest('form').find('[type="submit"]').prop('disabled', true);
5+
$('form').on('submit', function() {
6+
$(this).find('[type="submit"]').prop('disabled', true);
97
});
108
});
119
})(jQuery);

0 commit comments

Comments
 (0)