Skip to content
Snippets Groups Projects
Commit 3a069a88 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix(settings): scroll to top when starting the help tour - fix #993

parent 5c62badf
No related branches found
No related tags found
No related merge requests found
Pipeline #33048 failed
...@@ -20,7 +20,7 @@ angular.module('cesium.settings.controllers', ['cesium.services', 'cesium.curren ...@@ -20,7 +20,7 @@ angular.module('cesium.settings.controllers', ['cesium.services', 'cesium.curren
.controller('SettingsCtrl', SettingsController) .controller('SettingsCtrl', SettingsController)
; ;
function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $timeout, $translate, $ionicPopover, function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $timeout, $translate, $ionicPopover, $ionicScrollDelegate,
UIUtils, Modals, BMA, csHttp, csConfig, csCurrency, csSettings, csPlatform) { UIUtils, Modals, BMA, csHttp, csConfig, csCurrency, csSettings, csPlatform) {
'ngInject'; 'ngInject';
...@@ -481,6 +481,7 @@ function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $ti ...@@ -481,6 +481,7 @@ function SettingsController($scope, $q, $window, $ionicHistory, $ionicPopup, $ti
var helptipScope = $scope.createHelptipScope(tour); var helptipScope = $scope.createHelptipScope(tour);
if (!helptipScope) return; // could be undefined, if a global tour already is already started if (!helptipScope) return; // could be undefined, if a global tour already is already started
$ionicScrollDelegate.scrollTop(true);
return helptipScope.startSettingsTour(index, false) return helptipScope.startSettingsTour(index, false)
.then(function(endIndex) { .then(function(endIndex) {
helptipScope.$destroy(); helptipScope.$destroy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment