Skip to content

on user exit without complete throw error#192

Open
alfredosalzillo wants to merge 6 commits intodozoisch:masterfrom
alfredosalzillo:master
Open

on user exit without complete throw error#192
alfredosalzillo wants to merge 6 commits intodozoisch:masterfrom
alfredosalzillo:master

Conversation

@alfredosalzillo
Copy link
Copy Markdown

fix #180
When a user exits without complete the challenge throw error.

@UseMuse
Copy link
Copy Markdown

UseMuse commented Nov 20, 2020

check this plz

Copy link
Copy Markdown
Collaborator

@hartzis hartzis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition the code comments I'm having trouble trying to understand exactly what this PR is attempting to solve.

I commented in #180 asking for a https://codesandbox.io/ example so we can see the issue. This can also help when validating changes because we can publish alpha versions from PRs to test.

Thank you for taking the time to open a PR. We want to help fix errors/bugs but need a little more detail about the issue.

Comment thread src/recaptcha.js
if (!("MutationObserver" in window)) return original;
return new Promise((resolve, reject) => {
const frame = document
.querySelector('iframe[src*="google.com/recaptcha/api2/bframe"]')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 🤔 we should be cautious using a querySelector reaching for a very specific recaptcha related src that could change at will by google.

Comment thread src/recaptcha.js
observer.disconnect();
}
});
observer.observe(frame, { attributes: true, attributeFilter: ["style"] });
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📓 it also appears that if frame is null, from an unfound querySelector, the .observe methods errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Case Exit google recaptcha

3 participants