Scroll to top on error.
This commit is contained in:
parent
ecc3f75b7e
commit
75835ecf9e
|
@ -2,7 +2,7 @@
|
|||
|
||||
angular.module('ffffng')
|
||||
.directive('fNodeForm', function () {
|
||||
var ctrl = function ($scope, $timeout, Constraints, Validator, _, config) {
|
||||
var ctrl = function ($scope, $timeout, Constraints, Validator, _, config, $window) {
|
||||
$scope.config = config;
|
||||
angular.extend($scope, {
|
||||
center: {
|
||||
|
@ -107,6 +107,7 @@ angular.module('ffffng')
|
|||
default:
|
||||
$scope.error = 'Es ist ein Fehler aufgetreten. Versuche es später noch einmal.';
|
||||
}
|
||||
$window.scrollTo(0, 0);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue