5

Have discovered an issue that when a user hits refresh in IE, Google recaptcha (invisible or v2) will sit and spin indefinitely. From monitoring traffic it appears to not ever make the API calls out to Google for recaptcha when someone clicks the checkbox.

Steps to reproduce with recaptchaV2:

  1. On initial load, click recaptcha checkbox
    • Expected: green checkmark
    • Actual: green checkmark
  2. Click refresh or f5
  3. Click recaptcha checkbox
    • Expected: green checkmark
    • Actual: spins

Notes:

  • If dev tools are open, in step 3 the actual is the expected green checkmark
  • If ctrl + f5 is used in step 2, in step 3 the actual is the expected green checkmark
  • No console errors occur
  • Tried calling grecaptcha.reset() with no luck

Below is the code I used to isolate the problem. I used npm install http-server –g and http-server to serve the file.

<!doctype html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes">
    <script src="https://www.google.com/recaptcha/api.js?onload=onload&render=explicit" async defer></script>
</head>
<body> 
    <div id="gr123"></div>

    <script>            
        window.hasLoaded = false;
        window.onload = function() {        
            var elem = document.getElementById("gr123");

            if(!window.hasLoaded) {
                window.hasLoaded = true;
                grecaptcha.render(elem, {
                  "sitekey": "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI",                      
                  "size": 'normal'
                });

                grecaptcha.reset();
            }
        }
    </script>
</body>    
</html>

0 Answers0