CSR-1852 navigate out of iframe to confirmation page
This commit is contained in:
parent
602356ade2
commit
44a6218328
2 changed files with 9 additions and 5 deletions
|
|
@ -5,7 +5,11 @@
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-6 col-xl-4 p-0">
|
||||||
<div>
|
<div>
|
||||||
<alert
|
<alert
|
||||||
ref="piaCCErrorAlert"
|
ref="piaCCErrorAlert"
|
||||||
|
|
@ -25,11 +29,7 @@
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
v-bind:isDismissible="false" />
|
v-bind:isDismissible="false" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-6 col-xl-4 p-0">
|
|
||||||
<div id="card-container">
|
<div id="card-container">
|
||||||
<iframe
|
<iframe
|
||||||
v-resize
|
v-resize
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,11 @@ router.beforeEach(async (to, from, next) => {
|
||||||
const notToPIAReturn = toQueryPage != "payment-pia-return";
|
const notToPIAReturn = toQueryPage != "payment-pia-return";
|
||||||
const isInIframe = window !== window.top;
|
const isInIframe = window !== window.top;
|
||||||
|
|
||||||
if (isInIframe && notToPIAReturn) {
|
// fromPaymentToConfirmation workaround for navigating from an iframe but
|
||||||
|
// isInIframe evaluates to false for some reason when navigating from payment to confirmation
|
||||||
|
const fromPaymentToConfirmation = fromQueryPage === "payment" && toQueryPage === "confirmation";
|
||||||
|
|
||||||
|
if ((isInIframe && notToPIAReturn) || fromPaymentToConfirmation) {
|
||||||
const newUrl = `${window.top.location.origin}${to.href}`;
|
const newUrl = `${window.top.location.origin}${to.href}`;
|
||||||
window.top.location.href = newUrl;
|
window.top.location.href = newUrl;
|
||||||
// Refresh page if navigating to self to prevent locking.
|
// Refresh page if navigating to self to prevent locking.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue