dozoisch / dozoisch/react-google-recaptcha
Component Keeps Creating Divs
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
react-google-recaptcha version: 2.1.0
react-async-script version: 1.2.0
So I am working on a NextJS app, and I have the captcha on one of the pages - the contact page - and whenever I navigate away from and back to the contact page, the ReCaptcha component will append a new div to the document.
The script tag will also persist on client-side route changes, but does not duplicate itself like the div seems to.
going down the html tree, eventually I get to an iframe with the title "recaptcha challange."
It DOES seem to disappear for a second but very shortly comes back, (Screenshots below)
The code is publicly available at https://github.com/stream-pi/website
Some more noteworthy findings:
- happens in dev and prod
- issue only seems to occur when switching routes via the client (client-side routing)
- this issue happens with multiple types of captcha (invisible and checkbox)
I can provide any more information on request, any help would be greatly appreciated



Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.