summaryrefslogtreecommitdiffstats
path: root/js/directive/NewsAutoFocus.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-08-27 18:52:13 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-08-27 18:52:13 +0200
commitc7c2bf214c9cf6bde0c563ee68ffb5b61ed9734e (patch)
tree0d53bd6049bf05a5ddfae4957d950c124c791679 /js/directive/NewsAutoFocus.js
parent924d8b5d63813a833db3ba86acb438fc7c456bc4 (diff)
editing
Diffstat (limited to 'js/directive/NewsAutoFocus.js')
-rw-r--r--js/directive/NewsAutoFocus.js6
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