You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/directives/autofocus.js

15 lines
282 B

angular
.module('portainer')
.directive('autoFocus', ['$timeout', function porAutoFocus($timeout) {
var directive = {
restrict: 'A',
link: function($scope, $element) {
$timeout(function() {
$element[0].focus();
});
}
};
return directive;
}]);