From 5d2a47736905bc8f620773dc1ec85ba161ea1f06 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Mon, 21 Aug 2023 11:04:17 +0300 Subject: [PATCH] chore: incorrect order of spinner activation --- src/blocks/frontend/form/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blocks/frontend/form/index.js b/src/blocks/frontend/form/index.js index 7a94dbebe..e71a107d5 100644 --- a/src/blocks/frontend/form/index.js +++ b/src/blocks/frontend/form/index.js @@ -377,7 +377,7 @@ const collectAndSendInputFormData = async( form, btn, displayMsg ) => { const hasValidToken = id && window.themeisleGutenberg?.tokens?.[id]?.token; const spinner = makeSpinner( btn ); - spinner.show(); + if ( formIsEmpty ) { btn.disabled = false; @@ -461,6 +461,7 @@ const collectAndSendInputFormData = async( form, btn, displayMsg ) => { body: formData }); + spinner.show(); handleAfterSubmit( request, displayMsg,