@paystack/inline-js 2.15.0-dev.3 → 2.15.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inline.js +2 -2
- package/es/inline.js +2 -2
- package/lib/inline.js +2 -2
- package/package.json +1 -1
package/dist/inline.js
CHANGED
|
@@ -517,7 +517,7 @@ var PaystackPop = (function () {
|
|
|
517
517
|
};
|
|
518
518
|
|
|
519
519
|
/* eslint-env browser */
|
|
520
|
-
function
|
|
520
|
+
function findHighestZIndex() {
|
|
521
521
|
var highestZIndex = 0;
|
|
522
522
|
var elements = Array.from(document.querySelectorAll('body *'));
|
|
523
523
|
elements.forEach(function (element) {
|
|
@@ -818,7 +818,7 @@ var PaystackPop = (function () {
|
|
|
818
818
|
var modal = document.createElement('div');
|
|
819
819
|
modal.classList.add('pre-checkout-modal');
|
|
820
820
|
modal.id = "pre-checkout-modal-".concat(id);
|
|
821
|
-
modal.style.zIndex =
|
|
821
|
+
modal.style.zIndex = findHighestZIndex() + 1;
|
|
822
822
|
var content = document.createElement('div');
|
|
823
823
|
content.classList.add('pre-checkout-modal__content');
|
|
824
824
|
modal.appendChild(content);
|
package/es/inline.js
CHANGED
|
@@ -514,7 +514,7 @@ var canUseApplePay = function canUseApplePay() {
|
|
|
514
514
|
};
|
|
515
515
|
|
|
516
516
|
/* eslint-env browser */
|
|
517
|
-
function
|
|
517
|
+
function findHighestZIndex() {
|
|
518
518
|
var highestZIndex = 0;
|
|
519
519
|
var elements = Array.from(document.querySelectorAll('body *'));
|
|
520
520
|
elements.forEach(function (element) {
|
|
@@ -815,7 +815,7 @@ function mountPreCheckoutModal(id, transaction) {
|
|
|
815
815
|
var modal = document.createElement('div');
|
|
816
816
|
modal.classList.add('pre-checkout-modal');
|
|
817
817
|
modal.id = "pre-checkout-modal-".concat(id);
|
|
818
|
-
modal.style.zIndex =
|
|
818
|
+
modal.style.zIndex = findHighestZIndex() + 1;
|
|
819
819
|
var content = document.createElement('div');
|
|
820
820
|
content.classList.add('pre-checkout-modal__content');
|
|
821
821
|
modal.appendChild(content);
|
package/lib/inline.js
CHANGED
|
@@ -516,7 +516,7 @@ var canUseApplePay = function canUseApplePay() {
|
|
|
516
516
|
};
|
|
517
517
|
|
|
518
518
|
/* eslint-env browser */
|
|
519
|
-
function
|
|
519
|
+
function findHighestZIndex() {
|
|
520
520
|
var highestZIndex = 0;
|
|
521
521
|
var elements = Array.from(document.querySelectorAll('body *'));
|
|
522
522
|
elements.forEach(function (element) {
|
|
@@ -817,7 +817,7 @@ function mountPreCheckoutModal(id, transaction) {
|
|
|
817
817
|
var modal = document.createElement('div');
|
|
818
818
|
modal.classList.add('pre-checkout-modal');
|
|
819
819
|
modal.id = "pre-checkout-modal-".concat(id);
|
|
820
|
-
modal.style.zIndex =
|
|
820
|
+
modal.style.zIndex = findHighestZIndex() + 1;
|
|
821
821
|
var content = document.createElement('div');
|
|
822
822
|
content.classList.add('pre-checkout-modal__content');
|
|
823
823
|
modal.appendChild(content);
|