Skip to content

Commit

Permalink
Omly show switch tab message in environments which support popups
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Jan 23, 2020
1 parent a89b0a1 commit 8442111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/billing/template/containerTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsxDom */
/* eslint max-lines: 0 */

import { base64encode } from 'belter/src';
import { base64encode, supportsPopups } from 'belter/src';

import { fundingLogos } from '../../resources';
import { BUTTON_LOGO_COLOR, CHECKOUT_OVERLAY_COLOR } from '../../constants';
Expand Down Expand Up @@ -91,7 +91,7 @@ export function containerTemplate({ id, props, CLASS, ANIMATION, CONTEXT, EVENT,
event.preventDefault();
event.stopPropagation();

if (isIos()) {
if (isIos() && supportsPopups()) {
// eslint-disable-next-line no-alert
window.alert('Please switch tabs to reactivate the PayPal window');
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/checkout/template/containerTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx jsxDom */
/* eslint max-lines: 0 */

import { base64encode } from 'belter/src';
import { base64encode, supportsPopups } from 'belter/src';
import { ZalgoPromise } from 'zalgo-promise/src';

import { fundingLogos } from '../../resources';
Expand Down Expand Up @@ -59,7 +59,7 @@ export function containerTemplate({ id, props, CLASS, ANIMATION, CONTEXT, EVENT,
event.preventDefault();
event.stopPropagation();

if (isIos()) {
if (isIos() && supportsPopups()) {
// eslint-disable-next-line no-alert
window.alert('Please switch tabs to reactivate the PayPal window');
} else {
Expand Down

0 comments on commit 8442111

Please sign in to comment.