Add a ui-block to page after credit card submit event
This commit is contained in:
parent
aaf6a99d2b
commit
c0ba42ecfd
1 changed files with 24 additions and 0 deletions
|
|
@ -47,6 +47,8 @@
|
||||||
@back-clicked="backButtonAction" />
|
@back-clicked="backButtonAction" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="shouldBlockInteraction" class="ui-block" @click="supressClick"></div>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|
@ -231,6 +233,8 @@ export default {
|
||||||
piaLineItems: "",
|
piaLineItems: "",
|
||||||
lineItems: [],
|
lineItems: [],
|
||||||
availableVaps: [],
|
availableVaps: [],
|
||||||
|
|
||||||
|
shouldBlockInteraction: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
|
|
@ -598,12 +602,23 @@ export default {
|
||||||
if (event.data.indexOf("afterpayClosed") > -1) {
|
if (event.data.indexOf("afterpayClosed") > -1) {
|
||||||
this.backButtonAction();
|
this.backButtonAction();
|
||||||
}
|
}
|
||||||
|
if (event.data.indexOf("creditCardSubmit") > -1) {
|
||||||
|
this.setUIBlock(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setIFrameListener() {
|
setIFrameListener() {
|
||||||
window.addEventListener("message", (event) =>
|
window.addEventListener("message", (event) =>
|
||||||
this.handleIFrameContentWindwMessage(event)
|
this.handleIFrameContentWindwMessage(event)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
setUIBlock(val) {
|
||||||
|
this.shouldBlockInteraction = val;
|
||||||
|
},
|
||||||
|
supressClick(event) {
|
||||||
|
if (this.shouldBlockInteraction) {
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
|
|
@ -625,4 +640,13 @@ export default {
|
||||||
#pageLoadingModal {
|
#pageLoadingModal {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-block {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue