Delay of captcha removing disallows second captcha initialization during that time
Description: We have a signup form in a Popup modal. User can toggle the popup.
When popup is closed ReCAPTCHA componentWillUnmount fires:
componentWillUnmount() {
if (this._widgetId !== undefined) {
this.delayOfCaptchaIframeRemoving();
this.reset();
}
}
Delay is 5000ms. When user opens same popup quicker than 5000ms recaptcha won't be initialized.
To kinda deal with it I have to manually remove element .grecaptcha-badge in componentWillUnmount of the component consuming ReCAPTCHA. This way everything works but that's ugly 👎
Can we have an option to disable this custom logic on componentWillUnmount as it makes impossible to have new ReCAPTCHA initialized within 5 sec delay.
Additionally: There seems to be no harm with the error: uncaught (in promise) timeout to fix which the changes where made in this PR: https://github.com/dozoisch/react-google-recaptcha/pull/120/files It is internal false positive error originating from google script and it doesn't block further code execution. It was discussed here: https://github.com/dozoisch/react-google-recaptcha/issues/103 as well.
react-google-recaptcha version: 2.0.1