From c0ba42ecfd990c2135c1296ac07b68f1e86fe188 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 29 Nov 2023 13:59:34 -0500 Subject: [PATCH] Add a ui-block to page after credit card submit event --- src/layouts/payment/payment.vue | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index d86859668..44932fd6b 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -47,6 +47,8 @@ @back-clicked="backButtonAction" /> + +
@@ -231,6 +233,8 @@ export default { piaLineItems: "", lineItems: [], availableVaps: [], + + shouldBlockInteraction: false, }; }, directives: { @@ -598,12 +602,23 @@ export default { if (event.data.indexOf("afterpayClosed") > -1) { this.backButtonAction(); } + if (event.data.indexOf("creditCardSubmit") > -1) { + this.setUIBlock(true); + } }, setIFrameListener() { window.addEventListener("message", (event) => this.handleIFrameContentWindwMessage(event) ); }, + setUIBlock(val) { + this.shouldBlockInteraction = val; + }, + supressClick(event) { + if (this.shouldBlockInteraction) { + event.stopPropagation(); + } + }, }, components: { funnelHeader, @@ -625,4 +640,13 @@ export default { #pageLoadingModal { background-color: red; } + +.ui-block { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 9999; +}