/* * @ngdoc fbInputAutofocus * @name fasit.directives.#fbInputAutofocus * @fbInputAutofocus * * @description * Directive som försöker sätta focus till första input-element */ // Har migrerats till fbAutofocus.directive FB-7963 // TODO Vile: deprecated fbDeprecatedFile('fbInputAutofocus'); angular.module('fasit') .directive('fbInputAutofocus', ['$timeout', function ($timeout: ng.ITimeoutService) { 'use strict'; function link(scope: any, element: fb.IRootElementService, attrs: any) { fbDeprecated('fbInputAutofocus'); $timeout(function () { $(element).find('input').first().focus(); }); } function compile(element: fb.IRootElementService, attrs: any) { return link; } return { restrict: 'A', compile: compile, } }]);