We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f16150d commit d9ff5fdCopy full SHA for d9ff5fd
docs/src/templates/js/docs.js
@@ -5,16 +5,18 @@ var docsApp = {
5
};
6
7
8
-docsApp.directive.focused = function($defer) {
+docsApp.directive.focused = function($timeout) {
9
return function(scope, element, attrs) {
10
element[0].focus();
11
element.bind('focus', function() {
12
scope.$apply(attrs.focused + '=true');
13
});
14
element.bind('blur', function() {
15
- // have to use defer, so that we close the drop-down after the user clicks,
+ // have to use $timeout, so that we close the drop-down after the user clicks,
16
// otherwise when the user clicks we process the closing before we process the click.
17
- $defer(attrs.focused + '=false');
+ $timeout(function() {
18
+ scope.$eval(attrs.focused + '=false');
19
+ });
20
21
scope.$eval(attrs.focused + '=true')
22
}
0 commit comments