Bhaveshpp

Professional Magento Developr - Healp eachother to grow

Create account button is disabled after submit

23 May 2021 » magento2

Create account button still disable on submit

[https://support.magento.com/hc/en-us/articles/360051130212-2-4-1-and-2-3-6-create-an-account-button-disabled-hotfix]

diff --git a/vendor/magento/module-customer/view/frontend/web/js/block-submit-on-send.js b/vendor/magento/module-customer/view/frontend/web/js/block-submit-on-send.js
index b941ec7a254..75f4ee60976 100644
--- a/vendor/magento/module-customer/view/frontend/web/js/block-submit-on-send.js
+++ b/vendor/magento/module-customer/view/frontend/web/js/block-submit-on-send.js
@@ -14,9 +14,15 @@ define([
 
         dataForm.submit(function () {
             $(this).find(':submit').attr('disabled', 'disabled');
+
+            if (this.isValid === false) {
+                $(this).find(':submit').prop('disabled', false);
+            }
+            this.isValid = true;
         });
         dataForm.bind('invalid-form.validate', function () {
             $(this).find(':submit').prop('disabled', false);
+            this.isValid = false;
         });
     };
 });