bbonch / vue3-recaptcha2

Vue v3 component for Google reCAPTCHA v2
38 stars 9 forks source link

Recaptcha div added to HTML is not removed #6

Closed harikvpy closed 2 years ago

harikvpy commented 3 years ago

I observe that for every instantiation of the component, there's a

add to the app HTML at the bottom. Rightfully this should be removed when the page where captcha component is unmounted.

This is a sample screenshot of this div: image

Looking at your code, this element seems to be created by Google's captcha JS. Perhaps there's a call that you need to make to remove this element during component unmount.

bbonch commented 2 years ago

I think v-if is not a good example. There is no built-in way to destroy recaptcha. You should use v-show and reset.