reCaptcha appears on mobile device but not on desktop/laptop

安稳与你 提交于 2020-03-06 04:55:10

问题


I have come through a weird issue. Normally it's the other way around. My recaptcha appears on mobile device browser but does not appear in any browsers on my computer.

Below is my code. I'm using angular-recaptcha for my site.

<div class="row">
   <div class="col-xs-12">
        <div class="form-group">
            <div vc-recaptcha ng-model="registration.recaptcha" key="'therecaptchapublickey'"></div>
         </div>
    </div>
</div>

Below is my angular code. var app = angular.module('myapp',['ui.toggle','vcRecaptcha']);

app.controller('checkoutCtrl', function($scope, $http, $timeout){
   if($scope.registration.recaptcha != null || $scope.registration.recaptcha != undefined){
                $scope.emailmatch = 1;
                console.log('recaptcha ok');
            } else {
                $scope.emailmatch = 0;
                console.log('recaptcha invalid');
            }
});

I do not get any errors on the console or anything. The recaptcha is simply not displayed in any of the browsers. Clearing cache didn't help at all. But the captcha is displayed on mobile devices.

Any help is greatly appreciated.


回答1:


It turns out that this happens because I am loading the recaptcha.js from google as well as the angular-recaptcha.js file. Seems like the angular-recaptcha.js loads the recaptcha so removing the google recaptcha.js did the trick.



来源:https://stackoverflow.com/questions/43540974/recaptcha-appears-on-mobile-device-but-not-on-desktop-laptop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!