ng-recaptcha icon indicating copy to clipboard operation
ng-recaptcha copied to clipboard

`formControl.touched` is not set to true if the user interacted with captcha without resolving it

Open gvrs-orion opened this issue 5 years ago • 2 comments

Summary

I'm submitting a:

  • [x] bug report
  • [ ] feature request
  • [ ] question / support request
  • [ ] other

Description

gvrs-orion avatar Jun 26 '19 12:06 gvrs-orion

When re-captcha element is touched but not filled, we are not getting any trigger via event or via update to the angularElement.touched.

Once touched and not filled atleast angularElement.touched element should be updated to true.

gvrs-orion avatar Jun 26 '19 12:06 gvrs-orion

hi @gvrs-orion, and thx for submitting this!

unfortunately the recaptcha API does not have such a capability. Recaptcha element is displayed in a cross-origin frame, which complicates things a little bit. So far the only reliable way to achieve this behavior that I see is to track window "blur" event and wait until the focus reaches reCAPTCHA iframe element, but only trigger the "touch" event upon iframe-blur.

This is definitely achievable, but before this functionality is added to the lib - do you mind explaining what use-case are you trying to address? Is it addressable via other means?

DethAriel avatar Jun 26 '19 18:06 DethAriel