diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-08-27 18:52:13 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-08-27 18:52:13 +0200 |
commit | c7c2bf214c9cf6bde0c563ee68ffb5b61ed9734e (patch) | |
tree | 0d53bd6049bf05a5ddfae4957d950c124c791679 /js/directive/NewsAutoFocus.js | |
parent | 924d8b5d63813a833db3ba86acb438fc7c456bc4 (diff) |
editing
Diffstat (limited to 'js/directive/NewsAutoFocus.js')
-rw-r--r-- | js/directive/NewsAutoFocus.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/directive/NewsAutoFocus.js b/js/directive/NewsAutoFocus.js index a66f4453c..e66f7b3bf 100644 --- a/js/directive/NewsAutoFocus.js +++ b/js/directive/NewsAutoFocus.js @@ -11,7 +11,11 @@ app.directive('newsAutoFocus', () => { 'use strict'; return (scope, elem, attrs) => { - $(attrs.newsAutofocus).focus(); + if (attrs.newsAutofocus) { + $(attrs.newsAutofocus).focus(); + } else { + elem.focus(); + } }; });
\ No newline at end of file |