From cb2d89ed2098af4f33d62ff5accdbd3307a49d47 Mon Sep 17 00:00:00 2001 From: omrilotan <516342+omrilotan@users.noreply.github.com> Date: Mon, 26 Apr 2021 10:46:07 +0100 Subject: [PATCH] update recaptcha iframe src (#17) --- CHANGELOG.md | 11 ++++++++++- lib/UIElements/index.js | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fffcdbf..8d24db5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ +# 1.0.2 + +## Bug Fixes + +### Fix hiding Google's reCAPTCHA overlay +Modify reCAPTCHA's selector to fix auto-adjust z-index after its appearance + # 1.0.1 -## Make sure we're not hiding recaptcha's pedestrain crossing recogniser +## Bug Fixes + +### Make sure we're not hiding recaptcha's pedestrain crossing recogniser In case an element already existed on the page with z-index 2000000000 (which is Google's reCAPTCHA z-index), our modal was showing over it. This observer looks for Google's reCAPTCHA overlay and moves our modal **below** it. diff --git a/lib/UIElements/index.js b/lib/UIElements/index.js index 56cae9f..2f9dbbf 100644 --- a/lib/UIElements/index.js +++ b/lib/UIElements/index.js @@ -104,7 +104,7 @@ module.exports.createModal = function createModal({ ({ target }) => { // Find div containing Google reCAPTCHA iframe - if (target.querySelector('iframe[src*="google"][src*="recaptcha"]')) { + if (target.querySelector('iframe[src*="recaptcha"]')) { const recaptchaZIndex = Number(window.getComputedStyle(target).getPropertyValue('z-index')); if (recaptchaZIndex && recaptchaZIndex <= zIndex) { diff --git a/package.json b/package.json index 970aa2b..15a6d1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "perimeterx-axios-interceptor", - "version": "1.0.1", + "version": "1.0.2", "description": "🧱 Intercept requests which are blocked by PerimeterX - pop up the challenge and retry the request", "keywords": [ "perimeterx",