scroll up when error occurs
This commit is contained in:
parent
0875b7dd5b
commit
308919a305
4 changed files with 20 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('createController',
|
||||
function($scope, $rootScope, $location, $timeout, $log, lodash, go, profileService, configService, isCordova, gettext, ledger, trezor, isMobile, isChromeApp, isDevel, derivationPathHelper) {
|
||||
function($scope, $location, $anchorScroll, $rootScope, $timeout, $log, lodash, go, profileService, configService, isCordova, gettext, ledger, trezor, isMobile, isChromeApp, isDevel, derivationPathHelper) {
|
||||
|
||||
var self = this;
|
||||
var defaults = configService.getDefaults();
|
||||
|
|
@ -164,6 +164,7 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
if (err) {
|
||||
$log.warn(err);
|
||||
self.error = err;
|
||||
scrollUp();
|
||||
$timeout(function() {
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
|
@ -174,6 +175,11 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
}, 100);
|
||||
}
|
||||
|
||||
function scrollUp(){
|
||||
$location.hash('notification');
|
||||
$anchorScroll();
|
||||
};
|
||||
|
||||
this.formFocus = function(what) {
|
||||
if (!this.isWindowsPhoneApp) return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue