Google recaptcha rotates endlessly in IE 11 when updated

A problem was found with updating the user in IE, Google recaptcha (invisible or v2) will sit and rotate endlessly. From traffic tracking, it seems to never force the API to call Google for recaptcha when someone clicks on this checkbox.

Steps to play using recaptchaV2:

  • At boot, check the recaptcha box
    • Expected: green checkmark
    • Actual: green tick
  • Press update or f5
  • Click the recaptcha button.
    • Expected: green checkmark
    • Actual: backs

Notes:

  • If the dev tools are open, in step 3 the actual one is the expected green checkmark
  • If ctrl + f5 is used in step 2, the actual one in step 3 is the expected green checkmark
  • Errors in the console do not occur
  • grecaptcha.reset()

, . npm http-server -g http-server.

<!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>
+4

Source: https://habr.com/ru/post/1691044/


All Articles