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

Callback running outside NgZone

Open NicoBrg-WDG opened this issue 2 years ago • 2 comments

Hi,

It seems the callback after this.ngHcaptchaService.verify() runs outisde angular's change detection, I have to wrap it inside this.ngZone.run() to make it work, otherwise my page doesn't update correctly.

this.ngHcaptchaService.verify()
    .subscribe({
        next: (response) => this.zone.run(() =>/* update page */)
    });

Would it be possible to make your service run the callback inside angular's zone automatically ?

NicoBrg-WDG avatar Jul 03 '23 10:07 NicoBrg-WDG

Hi @NicoBrg-WDG, this will be fixed in 2.3.1.

leNicDev avatar Jan 04 '24 17:01 leNicDev

Thanks for the fix @leNicDev

NicoBrg-WDG avatar Jan 06 '24 21:01 NicoBrg-WDG