INSR-7760: Address copilot comments
- Add some missing semicolons - Better null checking for iframe - Better iOS check - Correct icon for successful dropdown input
This commit is contained in:
parent
db8d5bc3b5
commit
98a227afce
3 changed files with 14 additions and 7 deletions
|
|
@ -216,7 +216,7 @@ body {
|
|||
border-color: #0c7e47;
|
||||
}
|
||||
select {
|
||||
background-image: url(/icons/select-error.png);
|
||||
background-image: url(/icons/select-success.png);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ function getiOSversion() {
|
|||
if (/iP(hone|od|ad)/.test(navigator.platform)) {
|
||||
// supports iOS 2.0 and later:
|
||||
var v = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
|
||||
if (!v) {
|
||||
return null;
|
||||
}
|
||||
return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -782,7 +782,6 @@ export default {
|
|||
});
|
||||
},
|
||||
handleIFrameContentWindowMessage(event) {
|
||||
console.log('Received message from iframe:', event.data);
|
||||
const iframe = this.$refs.paymentFrame;
|
||||
if (typeof event.data !== 'string') {
|
||||
return;
|
||||
|
|
@ -856,12 +855,16 @@ export default {
|
|||
},
|
||||
submitPaymentAction() {
|
||||
const iframe = this.$refs.paymentFrame;
|
||||
iframe.contentWindow.postMessage('submitPayment', '*');
|
||||
if (iframe && iframe.contentWindow) {
|
||||
iframe.contentWindow.postMessage('submitPayment', '*');
|
||||
}
|
||||
},
|
||||
switchToAfterPay() {
|
||||
const iframe = this.$refs.paymentFrame;
|
||||
this.afterpayModalOpen = true;
|
||||
iframe.contentWindow.postMessage('afterpay-switch', '*');
|
||||
if (iframe && iframe.contentWindow) {
|
||||
this.afterpayModalOpen = true;
|
||||
iframe.contentWindow.postMessage('afterpay-switch', '*');
|
||||
}
|
||||
},
|
||||
showIssLoadingModal
|
||||
}
|
||||
|
|
@ -901,14 +904,14 @@ export default {
|
|||
|
||||
.switch-payment-container {
|
||||
@include media-breakpoint-up(lg) {
|
||||
padding-top: 1.25rem
|
||||
padding-top: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.switch-payment-text {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: .625rem;
|
||||
border-top: 1px solid #f0f1f2
|
||||
border-top: 1px solid #f0f1f2;
|
||||
}
|
||||
|
||||
.footer-component:deep(.footer) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue