Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d9ff5fd

Browse files
committed
fix(docs): migrate from $defer to $timeout
1 parent f16150d commit d9ff5fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/src/templates/js/docs.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ var docsApp = {
55
};
66

77

8-
docsApp.directive.focused = function($defer) {
8+
docsApp.directive.focused = function($timeout) {
99
return function(scope, element, attrs) {
1010
element[0].focus();
1111
element.bind('focus', function() {
1212
scope.$apply(attrs.focused + '=true');
1313
});
1414
element.bind('blur', function() {
15-
// have to use defer, so that we close the drop-down after the user clicks,
15+
// have to use $timeout, so that we close the drop-down after the user clicks,
1616
// otherwise when the user clicks we process the closing before we process the click.
17-
$defer(attrs.focused + '=false');
17+
$timeout(function() {
18+
scope.$eval(attrs.focused + '=false');
19+
});
1820
});
1921
scope.$eval(attrs.focused + '=true')
2022
}

0 commit comments

Comments
 (0)