Skip to content

Commit

Permalink
update recaptcha iframe src (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan authored Apr 26, 2021
1 parent 5858a56 commit cb2d89e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion lib/UIElements/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit cb2d89e

Please sign in to comment.