clifford-fra / GoogleRecaptchav2

The Google Recaptcha v2 checkbox flow component for Salesforce
10 stars 7 forks source link

Recaptcha challenge window is no longer resizing #11

Open thebridget opened 9 months ago

thebridget commented 9 months ago

After the Winter '24 Update, this component no longer resizes on our community sites. It displays as a small, scrollable window, with the same width as the "I am not a Robot" component, but a slightly larger height. Any chance this will be updated? It was working as expected prior to the major update.

txoag-A2SE commented 8 months ago

we're having a similar issue. Would love for this to be handled! image

austinElev8 commented 6 months ago

I am also having the same issue

Screenshot 2024-02-29 at 2 28 55 PM

SimonSlater99 commented 5 months ago

Did anybody find a solution for this problem? We have the same issue using the reCAPTCHA component in a screenflow exposed on an external website using lightning out and have not been able to adequately fix the problem.

thebridget commented 5 months ago

@SimonSlater99 Someone shared some CSS code to change the size of the iframe (in the comments for issue #5) on your Experience Site and that's been the best workaround for me: https://github.com/clifford-fra/GoogleRecaptchav2/issues/5#issuecomment-1734894861

There is a lot of blank space between the captcha and the Next button (unless the image prompt opens), but our clients are much happier with this option. Screenshot 2024-04-15 113830

Ashpork commented 5 months ago

I've still got the large white space between the statement and next button. I do mean to get around to solving this properly but the issue hasn't been able to bubble up the the top of the todo list! I hope to get eyes on it this week.

yi05 commented 3 months ago

Found the root cause, Google updated the JS that renders the reCAPTCHA. Update the function detectChallenge() in static resource https://github.com/clifford-fra/GoogleRecaptchav2/blob/master/force-app/main/default/staticresources/Google_Recaptcha.html:

function detectChallenge() {
    if (document.getElementsByTagName("div")[3]) {
        if (document.getElementsByTagName("div")[3].style.visibility === "visible") {
            big();
            // the height of the 6th div need to be set explicitly
            if(document.getElementsByTagName("div")[5]) {
                document.getElementsByTagName("div")[5].style.height = "480px";
            }   
            clearInterval(interval);
        }
    }
}
SimonSlater99 commented 2 months ago

Fantastic! Thank you very much 😊

Simon Slater | Salesforce Consultant | 021 253 7445 | @.**@.> | micado.aihttps://www.micado.ai/ | From: Yi @.> Sent: Tuesday, June 18, 2024 7:19 PM To: clifford-fra/GoogleRecaptchav2 @.> Cc: Simon Slater @.>; Mention @.> Subject: Re: [clifford-fra/GoogleRecaptchav2] Recaptcha challenge window is no longer resizing (Issue #11)

Found the cause, Google updated the JS that renders the reCAPTCHA. Update the function detectChallenge() static resource https://github.com/clifford-fra/GoogleRecaptchav2/blob/master/force-app/main/default/staticresources/Google_Recaptcha.html:

function detectChallenge() {

if (document.getElementsByTagName("div")[3]) {

    if (document.getElementsByTagName("div")[3].style.visibility === "visible") {

        big();

        // the height of the 6th div need to be set explicitly

        if(document.getElementsByTagName("div")[5]) {

            document.getElementsByTagName("div")[5].style.height = "480px";

        }

        clearInterval(interval);

    }

}

}

— Reply to this email directly, view it on GitHubhttps://github.com/clifford-fra/GoogleRecaptchav2/issues/11#issuecomment-2175359446, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6ZH7RLAAWL3TDSNZ7O5PFDZH7NNNAVCNFSM6AAAAABAQKCX5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZVGM2TSNBUGY. You are receiving this because you were mentioned.Message ID: @.**@.>>