Fix auto-disable button on form submit, per Chrome issues
dang it chrome, why you gotta be like that
This commit is contained in:
parent
178b9f2bcb
commit
e945ebe325
4 changed files with 13 additions and 7 deletions
|
@ -177,8 +177,14 @@ $(function() {
|
|||
$('a.button.autodisable').click(function() {
|
||||
disable_button(this);
|
||||
});
|
||||
$('input[type="submit"].autodisable').click(function() {
|
||||
disable_button(this);
|
||||
// for some reason chrome requires us to do things this way...
|
||||
// https://stackoverflow.com/questions/16867080/onclick-javascript-stops-form-submit-in-chrome
|
||||
// https://stackoverflow.com/questions/5691054/disable-submit-button-on-form-submit
|
||||
$('form.autodisable').submit(function() {
|
||||
var submit = $(this).find('input[type="submit"]');
|
||||
if (submit.length) {
|
||||
disable_button(submit);
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue