Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Invisible reCaptcha. Each time when I am back to a page where reCaptcha was loaded there a new reCapcha's iframe appeared under body element #30

Open
lexeek opened this issue Sep 27, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lexeek
Copy link

lexeek commented Sep 27, 2018

First of all thanks for work you've already done! Really nice solution.

Problem:

Each time when I am back to a page where reCaptcha was loaded there a new reCapcha's iframe appears under a "body" element but previous loaded iframes not removed.
And that leads me to the error in case when I made login and then logout:
in that time recaptcha loaded again on login page with new iframe.
Is it possible to destroy recaptcha component on recaptchaSuccess callback?

Reproducing:

To reproduce this, just open the example page (https://enngage.github.io/ngx-captcha/) and check a "body" element after moving between pages for example Quick Start and Invisible Captcha.
When you are on Invisible reCaptcha example page - click on reload several times.
Then wait forawile and check a console output you should see an errors like that:

I have faced with that errors in my application and dont know how to solve them.

  • image

  • image

Another problem with writing workable spec for my login component with reCapture

Also I have strange errors in jasmine tests for my login component where I have ngx-invisible-recaptcha component.

I have simple login form component with ngx-invisible-recaptcha component.
and I have a simple "should create" test, and also seems I've added all dependencies, I suspect that it depends on NgZone and runOutsideAngular (tried spyOn it, but it has not helped) method or something else. Error is really strange and it occurs from time to time (i have googled a lot and did not find correct solution xD ) When I removed component, error disappeared

image

Hope you can help. Thanks in advance!

@Enngage
Copy link
Owner

Enngage commented Oct 2, 2018

Hey, thanks for the detailed explanation. I'll be sure to have a look!

@Enngage Enngage self-assigned this Oct 2, 2018
@Enngage Enngage added the enhancement New feature or request label Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants