From 1da1f7d0be49a0c3154d58d07592b2742ea605ad Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Tue, 19 Nov 2019 19:18:17 +0530 Subject: [PATCH] fix(donate): re-order and scroll to top on processing --- .../Donation/components/DonateFormChildViewForHOC.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/Donation/components/DonateFormChildViewForHOC.js b/client/src/components/Donation/components/DonateFormChildViewForHOC.js index 0c07909c90..3d95dd2d7d 100644 --- a/client/src/components/Donation/components/DonateFormChildViewForHOC.js +++ b/client/src/components/Donation/components/DonateFormChildViewForHOC.js @@ -85,7 +85,6 @@ class DonateFormChildViewForHOC extends Component { handleSubmit(e) { e.preventDefault(); - this.hideAmountOptions(true); const email = this.getUserEmail(); if (!email || !isEmail(email)) { return this.setState(state => ({ @@ -130,6 +129,10 @@ class DonateFormChildViewForHOC extends Component { } })); + // hide the donation options on the parent and scroll to top + this.hideAmountOptions(true); + window.scrollTo(0, 0); + return postChargeStripe({ token, amount,