diff --git a/app/scripts/directives/nodeForm.js b/app/scripts/directives/nodeForm.js index 3b891f3..ab742f5 100644 --- a/app/scripts/directives/nodeForm.js +++ b/app/scripts/directives/nodeForm.js @@ -128,7 +128,8 @@ angular.module('ffffng') var doSubmit = function (node) { if ($scope.nodeForm.$invalid) { var firstInvalid = _.filter($element.find('form').find('input'), function (input) { - return input.name !== 'leaflet-base-layers' && $scope.nodeForm[input.name].$invalid; + return (input.type === 'text' || input.type === 'email') + && $scope.nodeForm[input.name].$invalid; })[0]; if (firstInvalid) { $window.scrollTo(0, $window.pageYOffset + firstInvalid.getBoundingClientRect().top - 100);