Created
November 19, 2020 11:47
-
-
Save tdgroot/d658d71567360f0f8aedca6ed2658244 to your computer and use it in GitHub Desktop.
Patch for issue magento/magento2#30513
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- view/frontend/web/js/block-submit-on-send.orig.js 2020-11-19 12:44:54.544000000 +0100 | |
+++ view/frontend/web/js/block-submit-on-send.js 2020-11-19 12:45:18.409967078 +0100 | |
@@ -14,9 +14,15 @@ | |
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; | |
}); | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment