【问题标题】:google recaptcha in colorbox IE can't enter textcolorbox IE中的谷歌recaptcha无法输入文本
【发布时间】:2015-03-12 13:00:58
【问题描述】:

我正在尝试在带有颜色框的 ajax 窗口中使用新的 google recaptcha。但是在 IE 9、10、11 中存在一个问题:我无法在文本字段中输入任何内容。没有彩盒就可以了。 这是我的代码

<script type="text/javascript" defer="defer" src="//www.google.com/recaptcha/api.js?ver=1"></script>      
    <div id="form">
        <div class="g-recaptcha" id="g-recaptcha" data-sitekey="<?= RECAPTCHA_KEY ?>"></div>
        <button name="" id="sendNotice" type="submit">Send</button>
    </div>
            <script>
                function showNoticePopup(productId, shopProductId) {
                    $.colorbox({
                        href: '#form',
                        onComplete: function() {
                            grecaptcha.render('g-recaptcha', {
                                'sitekey' : '<?= RECAPTCHA_KEY ?>'
                            });
                        }
                    });
                }
            showNoticePopup();
            </script>

有人知道解决办法吗?

【问题讨论】:

    标签: javascript jquery colorbox recaptcha


    【解决方案1】:

    我终于找到了解决方案。 问题出在名为 trapFocus 的颜色框选项中。 如果你有这个问题,只需将此选项设置为false 并享受:)

    类似问题已发布here 用于引导模式窗口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-18
      • 1970-01-01
      • 2023-03-17
      • 1970-01-01
      • 2017-07-12
      • 1970-01-01
      • 2021-06-17
      • 2022-06-16
      相关资源
      最近更新 更多