Skip to content

Commit

Permalink
Issue #3050 - Disable submits on form submit
Browse files Browse the repository at this point in the history
To prevent spamming the button and filing lots of bugs.
  • Loading branch information
Mike Taylor committed Oct 28, 2019
1 parent 975f699 commit f7e761e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webcompat/static/js/lib/bugform.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ BugForm.prototype.hideLoadingIndicator = function() {
};

BugForm.prototype.onFormSubmit = function(event) {
event.preventDefault();
this.disableSubmits();
this.showLoadingIndicator();
this.maybeUploadImage(event).then(
this.submitForm.bind(this),
Expand Down
2 changes: 2 additions & 0 deletions webcompat/static/js/lib/issue-wizard-bugform.js
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,8 @@ BugForm.prototype.hideLoadingIndicator = function() {
};

BugForm.prototype.onFormSubmit = function(event) {
event.preventDefault();
this.disableSubmits();
this.showLoadingIndicator();
this.maybeUploadImage(event).then(
this.submitForm.bind(this),
Expand Down

0 comments on commit f7e761e

Please sign in to comment.