Skip to content

Commit 12de015

Browse files
Merge branch 'magento-commerce:develop' into B2B-3098
2 parents 02c13f0 + 46a5e0b commit 12de015

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ define(
160160
grecaptcha.execute(widgetId);
161161
event.preventDefault(event);
162162
event.stopImmediatePropagation();
163+
if (this.$parentForm.valid()) {
164+
let formSubmitButton = this.$parentForm.find('button:not([type]), [type=submit]');
165+
166+
if (formSubmitButton.length) { //eslint-disable-line max-depth
167+
formSubmitButton.attr('disabled', true);
168+
}
169+
}
163170
}
164171
}.bind(this));
165172

0 commit comments

Comments
 (0)