dozoisch / dozoisch/react-google-recaptcha
iframe element not removed when component is unmounted, resulting in duplicate iframes
Open
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
react-google-recaptcha version: 3.1.0
react-async-script version: 1.2.0
Our recaptcha is being mounted inside of a modal, but when the modal is closed (and unmounted) the iframe that was created by react-google-recaptcha does not get cleaned up. This means that if the user opens and closes the modal multiple times, we end up with multiple iframes, as the recaptcha creates a new one each time it is mounted. This is, in essence, a memory leak as these hidden elements just keep adding up and never get cleaned up until a full page refresh.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.