diff --git a/www/js/controllers/join-controllers.js b/www/js/controllers/join-controllers.js index cd7a6b1bdbfc8ee2a24ae4e2dc89ff226ad956c7..457e4d4b74893e79a975f404461186fb9039bd26 100644 --- a/www/js/controllers/join-controllers.js +++ b/www/js/controllers/join-controllers.js @@ -105,7 +105,7 @@ function JoinChooseAccountTypeModalController($scope, $state, Modals, UIUtils, c } -function JoinModalController($scope, $state, $interval, $timeout, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) { +function JoinModalController($scope, $state, $interval, $timeout, Device, UIUtils, CryptoUtils, csSettings, Modals, csWallet, BMA, parameters) { 'ngInject'; $scope.formData = { @@ -122,8 +122,7 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt $scope.slideBehavior = {}; $scope.loading = true; - - $scope.isLicenseRead = false; + $scope.isLicenseRead = Device.isIOS(); // always enable the button, on IOS fix #554 $scope.showUsername = false; $scope.showPassword = false; $scope.formData.computing=false; @@ -144,7 +143,9 @@ function JoinModalController($scope, $state, $interval, $timeout, UIUtils, Crypt if ( $scope.licenseFileUrl.substring($scope.licenseFileUrl.length - 3) != '.txt') { $scope.licenseFileUrl = $scope.licenseFileUrl + '.html'; } - $scope.startListenLicenseBottom(); + if (!$scope.isLicenseRead) { + $scope.startListenLicenseBottom(); + } } } diff --git a/www/js/services/device-services.js b/www/js/services/device-services.js index 54db54fa99e1576dfbd89ae98e832442dcb58ecb..f5198edc9b9598ef1525c62d9b55c6c0a390ec0e 100644 --- a/www/js/services/device-services.js +++ b/www/js/services/device-services.js @@ -141,6 +141,10 @@ angular.module('cesium.device.services', ['cesium.utils.services', 'cesium.setti } }; + exports.isIOS = function() { + return !!navigator.userAgent.match(/iPhone | iPad | iPod/i) || ionic.Platform.isIOS(); + }; + exports.ready = function() { if (started) return $q.when(); return startPromise || exports.start();