Skip to content

Known issues

Paul Biccherai edited this page Jul 30, 2016 · 2 revisions

#Known issues

Tab index is not working

the "data-tabindex" attribute offered by the google api doesn't seem to work.

Use this workaround, from Alexander O'Mara, to fix it:

<script>
//Loop over the .g-recaptcha wrapper elements.
Array.prototype.forEach.call(document.getElementsByClassName('g-recaptcha'), function(element) {
    //Add a load event listener to each wrapper, using capture.
    element.addEventListener('load', function(e) {
        //Get the data-tabindex attribute value from the wrapper.
        var tabindex = e.currentTarget.getAttribute('data-tabindex');
        //Check if the attribute is set.
        if (tabindex) {
            //Set the tabIndex on the iframe.
            e.target.tabIndex = tabindex;
        }
    }, true);
});
</script>
Clone this wiki locally