react-google-recaptcha icon indicating copy to clipboard operation
react-google-recaptcha copied to clipboard

Need to detect "onHide" when running in "insivible" mode

Open rvetere opened this issue 7 years ago • 9 comments

Nice component! We just have one annoying edge case. When the re-captcha overlay challenge appears (running in invisible mode), and the user just clicks "outside" of the recaptcha challenge-box, the whole overlay will just hide.

Unfortunately, no function like "onChange" is fired in this case - making it impossible for us to detect this particular edge-case. Imagine that we want to handle a form-loading state, preventing people from multi-submitting. We can implement it perfectly with all cases, except this special one - as the hide-overlay action from the user is done "behind the curtains" - the form stays in the locking loading state when the user simply clicks away recaptcha :-/

rvetere avatar Jun 05 '18 13:06 rvetere

@rvetere does the original Google captcha have an event? Otherwise I can't do much.

dozoisch avatar Jun 05 '18 21:06 dozoisch

I need that too.

:(

luanfonceca avatar Jul 13 '18 18:07 luanfonceca

@luanfonceca as said, is this something the original Google ReCaptcha library supports? This is merely a wrapper around the Google library, and I can't add support for things that don't exist upstream.

dozoisch avatar Jul 13 '18 18:07 dozoisch

I looked over the google documentation about it and seems that they don't support it. I can think on some workaround for this but none of them looks good to me...

Something like if the user click outside of this component we consider that its hidden, but thats not a solution, right?

luanfonceca avatar Jul 13 '18 18:07 luanfonceca

For me, this worked fine: https://stackoverflow.com/a/44984658/1530565

luanfonceca avatar Jul 13 '18 19:07 luanfonceca

@luanfonceca if you are willing to do a PR it would be much appreciated :)

dozoisch avatar Jul 13 '18 19:07 dozoisch

How have you implemented the work around in react?

fsiegfried avatar Nov 06 '18 18:11 fsiegfried

How have you implemented the work around in react?

Did u got any solution for react.

riyazbhanvadia avatar Apr 27 '20 09:04 riyazbhanvadia

How have you implemented the work around in react?

Did u got any solution for react.

I posted a solution that might be of use for you: https://github.com/dozoisch/react-google-recaptcha/issues/205

michielglibert avatar Jun 09 '21 16:06 michielglibert